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

Running SAC: Operation failed to compute its gradient #31

Open
ian-cannon opened this issue Jun 25, 2020 · 3 comments
Open

Running SAC: Operation failed to compute its gradient #31

ian-cannon opened this issue Jun 25, 2020 · 3 comments

Comments

@ian-cannon
Copy link

Environment:

  • torch==1.5.0
  • mujoco-py==2.0.2.10

Usage:
python main.py --env-name Humanoid-v2 --alpha 0.05

Error:
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [256, 1]], which is output 0 of TBackward, is at version 3; expected version 2 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!

Hello there,
I am trying to run SAC and am getting the error shown above. I was told that rolling back to Torch 1.0.0 would fix the issue(installing now), but I do not understand why. Is this something that you are aware of?

@ian-cannon
Copy link
Author

I have verified, the code still works with Torch 1.0.0

@pranz24
Copy link
Owner

pranz24 commented Jun 26, 2020

It is working

Git clone again and try

@cuijianaaa
Copy link

I use torch==1.4.0 can fix 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

3 participants