mindspore.mint.greater
- mindspore.mint.greater(input, other)[source]
Compute the value of
element-wise.- Parameters
- Returns
Tensor
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> # case 1: The shape of two inputs are different >>> input = mindspore.tensor([1, 2, 3], mindspore.float32) >>> output = mindspore.mint.greater(input, 2.0) >>> print(output) [False False True] >>> # case 2: The shape of two inputs are the same >>> input = mindspore.tensor([1, 2, 3], mindspore.int32) >>> other = mindspore.tensor([1, 2, 4], mindspore.int32) >>> output = mindspore.mint.greater(input, other) >>> print(output) [ False False False]