Strange error when running my model in double data type

I am trying to run the LeNet5 model in the double data type but got this strange error:

Traceback (most recent call last):
  File "", line 152, in <module>
  File "", line 120, in train
  File "/home/***/anaconda2/lib/python2.7/site-packages/torch/autograd/", line 167, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)
  File "/home/***/anaconda2/lib/python2.7/site-packages/torch/autograd/", line 99, in backward
    variables, grad_variables, retain_graph)
RuntimeError: saved_variables() needed but not implemented in N5torch8autograd14AccumulateGradE

To run the model in the double type, I transformed both the input data and model to .double(). I am wondering what I should do to run the model in the double data type other than the default float type?


This should not happen… Could you provide us with some code to reproduce the problem on our side please?