Assuming we are in the unfortunate case of having a nan valued Variable. If it is passed through a ReLU activation the output is a zero. Is that the desired behaviour? (Other activation functions return nan instead as I would have expected)
import torch
from torch.autograd import Variable
import torch.nn.functional as F

A = Variable(torch.zeros(1))/0 # nan
print(F.relu(A))       # 0
print(F.elu(A))        # nan
print(F.leaky_relu(A)) # nan
print(F.sigmoid(A))    # nan