when I run this code called: recurrent_network.py which in pytorch-beginner-master\05-Recurrent Neural Network
a error come:
Traceback (most recent call last): File "recurrent_network.py", line 83, in <module> loss.backward() File "C:\Users\yuanz\Miniconda3\envs\py36\lib\site-packages\torch\tensor.py", line 102, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "C:\Users\yuanz\Miniconda3\envs\py36\lib\site-packages\torch\autograd\__init__.py", line 90, in backward allow_unreachable=True) # allow_unreachable flag RuntimeError: cudnn RNN backward can only be called in training mode
when I run this code called: recurrent_network.py which in pytorch-beginner-master\05-Recurrent Neural Network
a error come:
Traceback (most recent call last): File "recurrent_network.py", line 83, in <module> loss.backward() File "C:\Users\yuanz\Miniconda3\envs\py36\lib\site-packages\torch\tensor.py", line 102, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "C:\Users\yuanz\Miniconda3\envs\py36\lib\site-packages\torch\autograd\__init__.py", line 90, in backward allow_unreachable=True) # allow_unreachable flag RuntimeError: cudnn RNN backward can only be called in training mode