blob: b6bc1000c7899f3d9b9c8dc5d2f2a96a405623cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
### `tf.assert_less(x, y, data=None, summarize=None, message=None, name=None)` {#assert_less}
Assert the condition `x < y` holds element-wise.
Example of adding a dependency to an operation:
```python
with tf.control_dependencies([tf.assert_less(x, y)]):
output = tf.reduce_sum(x)
```
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.
##### Args:
* <b>`x`</b>: Numeric `Tensor`.
* <b>`y`</b>: Numeric `Tensor`, same dtype as and broadcastable to `x`.
* <b>`data`</b>: The tensors to print out if the condition is False. Defaults to
error message and first few entries of `x`, `y`.
* <b>`summarize`</b>: Print this many entries of each tensor.
* <b>`message`</b>: A string to prefix to the default message.
* <b>`name`</b>: A name for this operation (optional). Defaults to "assert_less".
##### Returns:
Op that raises `InvalidArgumentError` if `x < y` is False.
|