mindspore.ops.fmax
- mindspore.ops.fmax(input, other)[source]
Compute the maximum of input tensors element-wise.
Note
Support implicit type conversion and type promotion.
Shapes of input and other should be able to broadcast.
If one of the elements to be compared is NaN, another element is returned.
- Supported Platforms:
CPU
Examples
>>> import mindspore >>> x1 = mindspore.tensor([1.0, 5.0, 3.0], mindspore.float32) >>> x2 = mindspore.tensor([4.0, 2.0, 6.0], mindspore.float32) >>> output = mindspore.ops.fmax(x1, x2) >>> print(output) [4. 5. 6.]