File "/home/jd/pytorch/examples/translation/translate_gpu.py", line 296, in trainEpochs
loss = train(input_variable, target_variable, encoder, decoder, encoder_optimizer, decoder_optimizer, criterion)
File "/home/jd/pytorch/examples/translation/translate_gpu.py", line 247, in train
loss.backward()
File "/home/jd/anaconda/lib/python2.7/site-packages/torch/autograd/variable.py", line 158, in backward
self._execution_engine.run_backward((self,), (gradient,), retain_variables)
RuntimeError: could not compute gradients for some functions (CudnnRNN)
It works on the CPU. Any hints as to what might be causing this behavior? The RuntimeError sadly doesn’t mention which operations couldn’t get the gradient computed. Is there a list of supported/unsupported ops I could reference somewhere?
Got 0.1.9 hot off the press and I can confirm it works, approx 3.5x speedup on my GPU. Any ideas for making it faster? Is it a bad idea to make new Variables in the training loop?
Oh no, you’ve found the new version before it has been taken down! There’s been one new bug introduced by my fix for this issue, and we’ll reupload the packages today, so please update it again.
What do you want to make faster? I can’t tell without seeing the code
Hi,
I also run into this bug when I am trying to realize Layer-wise Relevance Propagation.
Concretly, I rewrite backward function for each layer in Net, for example
Traceback (most recent call last):
File "G:\Explainer\_Geo_Exp_inter\infectionLRP.py", line 117, in <module>
print(model.readout.backward(out))
File "D:\Anaconda3\lib\site-packages\torch\tensor.py", line 195, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "D:\Anaconda3\lib\site-packages\torch\autograd\__init__.py", line 98, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: could not compute gradients for some functions
It has confused me for a few days and I don’t really kown what cause it and how to fix it.