Missed TensorFlow World? Check out the recap. Learn more

tf.math.not_equal

View source on GitHub

Returns the truth value of (x != y) element-wise.

Aliases:

  • tf.compat.v1.math.not_equal
  • tf.compat.v1.not_equal
  • tf.compat.v2.math.not_equal
  • tf.compat.v2.not_equal
  • tf.not_equal
tf.math.not_equal(
    x,
    y,
    name=None
)

Used in the guide:

Used in the tutorials:

NOTE: NotEqual supports broadcasting. More about broadcasting here

Args:

  • x: A Tensor or SparseTensor or IndexedSlices.
  • y: A Tensor or SparseTensor or IndexedSlices.
  • name: A name for the operation (optional).

Returns:

A Tensor of type bool with the same size as that of x or y.