tf.compat.v1.assert_less

View source on GitHub

Assert the condition x < y holds element-wise.

tf.compat.v1.assert_less(
    x, y, data=None, summarize=None, message=None, name=None
)

This condition holds if for every pair of (possibly broadcast) elements x[i], y[i], we have x[i] < y[i]. If both x and y are empty, this is trivially satisfied.

When running in graph mode, you should add a dependency on this operation to ensure that it runs. Example of adding a dependency to an operation:

with tf.control_dependencies([tf.compat.v1.assert_less(x, y)]):
  output = tf.reduce_sum(x)

Args:

Returns:

Op that raises InvalidArgumentError if x < y is False.

Raises:

Eager Compatibility

returns None