mindspore.mint.reciprocal
- mindspore.mint.reciprocal(input)[source]
Returns reciprocal of a tensor element-wise.
- Parameters
input (Tensor) – The input tensor.
- Returns
Tensor
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> input = mindspore.tensor([1.0, 2.0, 4.0], mindspore.float32) >>> output = mindspore.mint.reciprocal(input) >>> print(output) [1. 0.5 0.25]