ReLU turns nan into zeros

since NaN != NaN you could do my_tensor[my_tensor!=my_tensor] = 0