pytorch_solov2
pytorch_solov2 copied to clipboard
请问大家有遇到 inplace operation 错误呀
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).
看起来pytorch版本的问题
谢谢答复,除了将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 问题