mindspore.mint.rsqrt
- mindspore.mint.rsqrt(input)[源代码]
逐元素计算输入tensor的平方根倒数。
\[out_{i} = \frac{1}{\sqrt{input_{i}}}\]- 参数:
input (Tensor) - 输入tensor。
- 返回:
Tensor
- 支持平台:
Ascend
样例:
>>> import mindspore >>> input = mindspore.tensor([-0.0370, 0.2970, 1.5420, -0.9105]) >>> output = mindspore.mint.rsqrt(input) >>> print(output) [ nan 1.8349396 0.8053002 nan]