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:
- input (dragon.vm.torch.Tensor) – The input tensor.
- out (dragon.vm.torch.Tensor, optional) – The output tensor.
- Returns:
dragon.vm.torch.Tensor – The output tensor.