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:
Returns:

dragon.vm.torch.Tensor The output tensor.