tf.assert_positive(x, data=None, summarize=None, message=None, name=None)
Assert the condition x > 0 holds element-wise.
Example of adding a dependency to an operation:
with tf.control_dependencies([tf.assert_positive(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
x = tf.with_dependencies([tf.assert_positive(x)], x)
Positive means, for every element x[i] of x, we have x[i] > 0. If x is empty this is trivially satisfied.
Args:
x: Numeric Ten