dni.pytorch
dni.pytorch copied to clipboard
volatile can only be set on leaf variables
Hi, Andrew
As I run your code, there prints a RuntimeError: 'volatile can only be set on leaf variables' in line 44 of train.py
self.backprop_grads[name].volatile = False
could you check it out?
Thanks
Same problem any solutions?
adding the following seems to make it work:
if self.backprop_grads[name].grad_fn == None: self.backprop_grads[name].volatile = False
However there are still other issues
will check it these days, I doubt that it's about the version of pytorch since this error didn't appear before.
agree that adding the following seems to make it work:
if self.backprop_grads[name].grad_fn == None: self.backprop_grads[name].volatile = False