You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am experimenting with VOGN and I am getting this error:
File "/home/thom/anaconda3/envs/TUT_3/lib/python3.7/site-packages/torchsso-0.1.1-py3.7.egg/torchsso/optim/vi.py", line 215, in step
grads = [p.grad.data for p in params]
File "/home/thom/anaconda3/envs/TUT_3/lib/python3.7/site-packages/torchsso-0.1.1-py3.7.egg/torchsso/optim/vi.py", line 215, in <listcomp>
grads = [p.grad.data for p in params]
AttributeError: 'NoneType' object has no attribute 'data'
Debugging I found that sometimes p.grad is None here grads = [p.grad.data for p in params]
I didn't freeze any layer, I am learning from scratch.
Probably there is an error of my configuration. Do you have any hints about what could be the problem?
I found already the bug. In the forward function, you must use all parameters of the model otherwise some p.grad will be None after calling backward. That could be a problem if anyone would like to use it for fine-tunning. Other optimizers like Adam are more flexible in that case.
Hello,
I am experimenting with VOGN and I am getting this error:
Debugging I found that sometimes p.grad is None here
grads = [p.grad.data for p in params]
I didn't freeze any layer, I am learning from scratch.
Probably there is an error of my configuration. Do you have any hints about what could be the problem?
Here is the initialization of the optimizer:
The text was updated successfully, but these errors were encountered: