torch.isnan — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.isnan(input) → Tensor. Returns a new tensor with boolean elements representing if each element of input is NaN or not. Complex values are considered NaN when either their real and/or imaginary part is NaN. Parameters. input ( Tensor) – the input tensor. Returns. A boolean tensor that is True where input is NaN and False elsewhere.
torch.nan_to_num — PyTorch 1.10.1 documentation
https://pytorch.org/docs/stable/generated/torch.nan_to_num.htmltorch.nan_to_num — PyTorch 1.10.1 documentation torch.nan_to_num torch.nan_to_num(input, nan=0.0, posinf=None, neginf=None, *, out=None) → Tensor Replaces NaN, positive infinity, and negative infinity values in input with the values specified by nan, posinf, and neginf, respectively.
torch.nan_to_num — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.nan_to_num(input, nan=0.0, posinf=None, neginf=None, *, out=None) → Tensor. Replaces NaN, positive infinity, and negative infinity values in input with the values specified by nan, posinf, and neginf, respectively. By default, NaN s are replaced with zero, positive infinity is replaced with the greatest finite value representable by ...