oneflow.lt¶
-
oneflow.
lt
(input, other) → Tensor¶ Returns the truth value of \(input < other\) element-wise.
- Parameters
input (oneflow.Tensor) – A Tensor
other (oneflow.Tensor) – A Tensor
- Returns
A Tensor with bool type.
- Return type
For example:
>>> import numpy as np >>> import oneflow as flow >>> input1 = flow.tensor(np.array([1, 2, 3]).astype(np.float32), dtype=flow.float32) >>> input2 = flow.tensor(np.array([1, 2, 4]).astype(np.float32), dtype=flow.float32) >>> out = flow.lt(input1, input2) >>> out tensor([False, False, True], dtype=oneflow.bool)