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

Error when running the demo #3

Open
yuguangyue opened this issue Oct 21, 2020 · 2 comments
Open

Error when running the demo #3

yuguangyue opened this issue Oct 21, 2020 · 2 comments

Comments

@yuguangyue
Copy link

Hi, I was running the demo code
python run_experiment.py --nosrun -e exp_specs/sac.yaml

but get following error, do you have any idea why this happens? Thank you!
(I am using pytorch 1.6.0 and python version 3.7.9)

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [32, 1]], which is output 0 of TBackward, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

@sjtulyf123
Copy link

Hello, I overcame the same error. Try to update policy network before updating q1 and q2 and set retain_graph=True and it might work. This error seems to be relevant to the torch or cuda version...

@KamyarGh
Copy link
Owner

Hi, sorry for missing the original post. I also think maybe this is coming from not using the correct torch version (the conda virtual env specs are given in the .yml file).

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

3 participants