isnan

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

Check if the elements of input are NaN.

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

Examples:

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

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