mindspore.ops.LessEqual

class mindspore.ops.LessEqual[源代码]

逐元素计算 \(x <= y\) 的bool值。

更多参考详见 mindspore.ops.le()

支持平台:

Ascend GPU CPU

样例:

>>> x = Tensor(np.array([1, 2, 3]), mindspore.int32)
>>> y = Tensor(np.array([1, 1, 4]), mindspore.int32)
>>> less_equal = ops.LessEqual()
>>> output = less_equal(x, y)
>>> print(output)
[ True False  True]