isinf¶
dragon.vm.torch.
isinf
(input)[source]¶Check if the elements of input are infinite.
\[\text{out} = \text{isinf}(\text{input}) \]Examples:
x = torch.tensor([0., 1., float('inf')]) print(torch.isinf(x)) # [False, False, True]
- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- Returns:
dragon.vm.torch.Tensor – The output tensor.