Equivalent to numpy's nan_to_num?

If you’re using PyTorch’s nightly builds (or wait until PyTorch 1.8) then we’ve added nan_to_num. See its documentation here:

2 Likes