Pytorch Torch Isnan
# PyTorch torch.isnan Function
* * *
[
* * *
## Usage Example
## Example
import torch
import math
x = torch.tensor([1.0,math.nan,3.0,float('nan')])
result = torch.isnan(x)
print(result)
Output result:
tensor([False, True, False, True])
* * *
[![Image 4: Pytorch torch Reference Manual]( Pytorch torch Reference Manual](
YouTip