equal

dragon.vm.tensorflow.math.equal(
  x,
  y,
  name=None
)[source]

Compute the element-wise equal comparison.

\[\text{out} = (x == y) \]

Examples:

x = tf.constant(2)
y = tf.constant(3)
z = tf.constant(3)
print(tf.math.equal(x, y))
print(tf.math.equal(y, z))
Parameters:
  • x (dragon.Tensor) – The input tensor.
  • y (dragon.Tensor) – The tensor \(y\).
  • name (str, optional) – A optional name for the operation.
Returns:

dragon.Tensor – The output tensor.