Spec-Zone.ru › TensorFlow

tf.math.is_non_decreasing

Возвращает 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 не является численным тензором.

© 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_non_decreasing

Spec-Zone.ru

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