mindspore.ops.rsqrt

View Source On Gitee
mindspore.ops.rsqrt(input)[source]

Compute reciprocal of square root of input tensor element-wise.

outi=1inputi
Parameters

input (Tensor) – The input tensor.

Returns

Tensor

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> input = mindspore.tensor([-0.0370,  0.2970,  1.5420, -0.9105])
>>> output = mindspore.ops.rsqrt(input)
>>> print(output)
[       nan 1.8349396  0.8053002        nan]