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

self.gamma*out considered as "in place" operation #62

Open
NGluna03 opened this issue Oct 21, 2022 · 0 comments
Open

self.gamma*out considered as "in place" operation #62

NGluna03 opened this issue Oct 21, 2022 · 0 comments

Comments

@NGluna03
Copy link

Hi,
during the backward pass i'm facing the following error:
"RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [1]] is at version 1; expected version 0 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!"
Specifically the error occurs at the line out= self.gammaout +x and it seams to be due to "self.gammaout".
I also tried to change it to torch.mul(self.gamma, out) but it didn't solve the issue.
Do you have any idea on what the alternative solutions that I could try?

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

1 participant