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

请问大家有遇到 inplace operation 错误呀 #22

Open
ViatorSun opened this issue May 16, 2022 · 2 comments
Open

请问大家有遇到 inplace operation 错误呀 #22

ViatorSun opened this issue May 16, 2022 · 2 comments

Comments

@ViatorSun
Copy link

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

@ABlueLight
Copy link
Contributor

看起来pytorch版本的问题

@ViatorSun
Copy link
Author

谢谢答复,除了将Pytorch版本降低之外,修改 mask_feat_head.py 里面的 forward 函数中的 feature_add_all_level += self.convs_all_levels[i](input_p) 改为 feature_add_all_level = self.convs_all_levels[i](input_p) + feature_add_all_level 就可以解决 inplace operation 问题

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