Traceback (most recent call last): File "test.py", line 69, in <module> loss.backward() File "C:\Users\yana\AppData\Local\Continuum\anaconda3\envs\fastai\lib\site-packages\torch\autograd\variable.py", line 167, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables) File "C:\Users\yana\AppData\Local\Continuum\anaconda3\envs\fastai\lib\site-packages\torch\autograd\__init__.py", line 99, in backward variables, grad_variables, retain_graph) RuntimeError: element 0 of variables tuple is volatile
i’m getting this error now
maybe i should add:
out.volatile = False out.requires_grad = True