Spec-Zone.ru › TensorFlow 2.4

tf.math.is_non_decreasing

Просмотреть исходный код на GitHub

Возвращает True если x является неубывающей.

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

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

См. Руководство по миграции для получения дополнительной информации.

tf.compat.v1.debugging.is_non_decreasing, tf.compat.v1.is_non_decreasing, tf.compat.v1.math.is_non_decreasing

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

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

См. также: is_strictly_increasing

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

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/python/tf/math/is_non_decreasing

Spec-Zone.ru

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