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

gradient computation problems #4

Open
mokby opened this issue Jun 27, 2024 · 3 comments
Open

gradient computation problems #4

mokby opened this issue Jun 27, 2024 · 3 comments

Comments

@mokby
Copy link

mokby commented Jun 27, 2024

I follow the instruction as described in readme.md, and when I running python3 train.py‘, errors occured, I googled and try to modify inplace=True' into 'inplace=False', but that does not help.

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [4, 128, 64, 64]], which is output 0 of ReluBackward0, 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!
@KaibingHu
Copy link

You can try to edit the 101 row of /models/FPN/FPN_Head.py.Chage += into =

@mokby
Copy link
Author

mokby commented Jul 14, 2024

Thanks ,that works

@gs-max
Copy link

gs-max commented Oct 4, 2024

您可以尝试将 /models/FPN/FPN_Head.py.Chage += 的 101 行编辑为 =
您好,我不太清楚您说的是哪里,我的101行内容是这样的:laterals[i - 1] += F.interpolate(laterals[i], size=prev_shape, mode='nearest')

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