tf.math.greater

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

tf.math.greater(
    x, y, name=None
)

NOTE: math.greater supports broadcasting. More about broadcasting here

Example:

x = tf.constant([5, 4, 6])
y = tf.constant([5, 2, 5])
tf.math.greater(x, y) ==> [False, True, True]

x = tf.constant([5, 4, 6])
y = tf.constant([5])
tf.math.greater(x, y) ==> [False, False, True]

Args:

Returns:

A Tensor of type bool.