isfinite

dragon.vm.torch.isfinite(input)[source]

Check if the elements of input are finite.

\[\text{out} = \text{isfinite}(\text{input}) \]

Examples:

x = torch.tensor([0., float('nan'), float('inf')])
print(torch.isfinite(x))  # [True, False, False]
Parameters:
Returns:

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