Spec-Zone.ru › TensorFlow

tf.math.is_strictly_increasing

Возвращает True, если x строго возрастает.

Просмотр псевдонимов

Псевдонимы совместимости для миграции

Подробнее см. в руководстве по миграции.

tf.compat.v1.debugging.is_strictly_increasing, tf.compat.v1.is_strictly_increasing, tf.compat.v1.math.is_strictly_increasing

tf.math.is_strictly_increasing(
    x, name=None
)

Элементы x сравниваются в порядке следования строк. Тензор [x[0],...] строго возрастает, если для каждой соседней пары выполняется x[i] < x[i+1]. Если x содержит менее двух элементов, он тривиально является строго возрастающим.

См. также: is_non_decreasing

x1 = tf.constant([1.0, 2.0, 3.0])
tf.math.is_strictly_increasing(x1)
<tf.Tensor: shape=(), dtype=bool, numpy=True>
x2 = tf.constant([3.0, 1.0, 2.0])
tf.math.is_strictly_increasing(x2)
<tf.Tensor: shape=(), dtype=bool, numpy=False>
Аргументы
x Числовой Tensor.
name Имя этой операции (необязательно). По умолчанию — "is_strictly_increasing"
Возвращает
Булев Tensor, равный True тогда и только тогда, когда x строго возрастает.
Вызывает исключение
TypeError если x не является числовым тензором.

© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/math/is_strictly_increasing

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API