Skip to content

RuntimeError: gradient computation has been modified by an inplace operation #3

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

Open
WenjinFu opened this issue Feb 29, 2024 · 2 comments

Comments

@WenjinFu
Copy link

WenjinFu commented Feb 29, 2024

image image image image

I tried to use one query and let gpt generate loss function "ChangeToLeftLane", I got the error the operation that failed to compute its gradient due to in place modification. I also tried the loss function "KeepDistanceLoss()" that already defined in your file and got the same error by using the generated loss from ChangeToLeftLane. May I know where I should look at to fix this issue. Huge thanks in advance!

@MarttiWu
Copy link

MarttiWu commented Mar 1, 2024

Cloning the yaw_pred before transformations in line 477 of the tbsim/utils/geometry_utils.py file may solve the issue.

Screenshot 2024-03-01 at 10 38 46 AM

@WenjinFu
Copy link
Author

WenjinFu commented Mar 1, 2024

Thanks it works out perfectly!

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