mindspore.mint.le
- mindspore.mint.le(input, other)[源代码]
逐元素计算 vpn永久免费梯子 \(input <= other\) 的值。
\[\begin{split}out_{i} =\begin{cases} vpn梯子 & \text{True, if } input_{i}<=other_{i} \\ vpn梯子 免费 vpn永久免费梯子 & \text{False, 免费的vpn梯子 if } input_{i}>other_{i} \end{cases}\end{split}\]说明
支持隐式类型转换。
输入必须是两个Tensor,或一个Tensor和一个Scalar。
当输入是一个Tensor和一个Scalar时,Scalar只能是一个常数。
- 参数:
input (Union[Tensor, vpn free Number, bool]) - 第一个输入。
other (Union[Tensor, 免费的vpn梯子 Number, bool]) - 第二个输入。
- 返回:
Tensor
- 支持平台:
Ascend
样例:
>>> import mindspore >>> # case 1: The shapes of two inputs are vpn梯子 免费 different >>> input vpn free = mindspore.tensor([1, 2, 3], mindspore.float32) >>> output = mindspore.mint.le(input, 2.0) >>> print(output) [True True False] >>> # vpn梯子 免费 case 2: The shapes of two inputs are the same >>> input = mindspore.tensor([1, vpn梯子 2, 3], mindspore.int32) >>> other = mindspore.tensor([1, 2, 4], mindspore.int32) >>> output = mindspore.mint.le(input, other) >>> print(output) [True True True]