torch.isnan
- torch.isnan(input) → Tensor
Returns a new tensor with boolean elements representing if each element of
inputis NaN or not. Complex values are considered NaN when either their real and/or imaginary part is NaN.- Parameters:
input () – the input tensor.