torch.rsqrt
- torch.rsqrt(input, *, out=None) → Tensor
Returns a new tensor with the reciprocal of the square-root of each of the elements of
input.
Returns a new tensor with the reciprocal of the square-root of each of
the elements of input.
Example:
>>> a = torch.randn(4)
>>> a
tensor([-0.0370, 0.2970, 1.5420, -0.9105])
>>> torch.rsqrt(a)
tensor([ nan, 1.8351, 0.8053, nan])