To avoid this mistake, you should keep in mind that a Function is not an nn.Module and should be used only once.
Also, for better performance, you should use the new style functions as follow:
class reluForward(torch.autograd.Function):
  @staticmethod
  def forward(self, inp):
    #option1:
    #return = inp * (inp>0).float()
    #option2:
    #return F.relu(inp).data
    #option3:
    return F.relu(inp)

  @staticmethod
  def backward(self, grad_out):
    return grad_out

# To use it:
inp = Variable(torch.rand(10, 10))
out = reluForward.apply(inp) # Use the class here, not an instance of it !