tf.raw_ops.Equal
Возвращает логическое значение (x == y) поэлементно.
tf.raw_ops.Equal(
x, y, incompatible_shape_error=True, name=None
)
Примечание: Equal поддерживает вещание. Дополнительные сведения о вещании см. здесь
x = tf.constant([2, 4]) y = tf.constant(2) tf.math.equal(x, y) ==> array([True, False]) x = tf.constant([2, 4]) y = tf.constant([2, 4]) tf.math.equal(x, y) ==> array([True, True])
| Аргументы | |
|---|---|
x | A Tensor. |
y | A Tensor. Должен иметь тот же тип, что и x. |
incompatible_shape_error | Необязательный bool. По умолчанию True. |
name | Имя операции (необязательно). |
| Возвращаемое значение | |
|---|---|
A Tensor типа bool. |
© 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/raw_ops/Equal