Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNN backward function in evaluation error #5

Open
choshin84 opened this issue Aug 28, 2019 · 1 comment
Open

RNN backward function in evaluation error #5

choshin84 opened this issue Aug 28, 2019 · 1 comment

Comments

@choshin84
Copy link

trying to run sample code but getting below error.
appreciate your help

my environment is
Ubuntu 16.04.6 LTS
Pytorch 1.2.0
GPU Titan-V
Cuda version 10.1

Traceback (most recent call last):
File "train_text.py", line 357, in
main(args)
File "train_text.py", line 253, in main
val_nll = eval(val_data, model, meta_optimizer)
File "train_text.py", line 327, in eval
var_params_svi = meta_optimizer.forward([mean_svi, logvar_svi], sents)
File "/home/ubuntu/Program/sa-vae/optim_n2n.py", line 43, in forward
return self.forward_mom(input, y, verbose)
File "/home/ubuntu/Program/sa-vae/optim_n2n.py", line 90, in forward_mom
all_grads_k = torch.autograd.grad(loss, all_input_params, retain_graph = True)
File "/home/ubuntu/.pyenv/versions/3.6.8/lib/python3.6/site-packages/torch/autograd/init.py", line 149, in grad
inputs, allow_unused)
RuntimeError: cudnn RNN backward can only be called in training mode

@HOLMEScdk
Copy link

Hi do you solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants