rsqrt

dragon.vm.torch.rsqrt(
  input,
  out=None
)[source]

Compute the reciprocal square root of input.

\[\text{out} = \frac{1}{\sqrt{\text{input}}} \]

Examples:

x = torch.tensor([0., 4., 16.])
print(torch.rsqrt(x))  # [inf, 0.5, 0.25]
Parameters:
Returns:

dragon.vm.torch.Tensor – The output tensor.