Spec-Zone.ru › TensorFlow 2.3

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 сравниваются в строчном порядке. Тензор [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.3/api_docs/python/tf/math/is_non_decreasing

Spec-Zone.ru

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