FreeSOLO
FreeSOLO copied to clipboard
The training error
Hello, I meet an error when training freesolo:
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation...
I also had the same error- while trying to train in single GPU with batchsize of 2.
This happened to me. I fixed it by replacing the following line in solov2.py, line 981
https://github.com/NVlabs/FreeSOLO/blob/176d7fd580bbfe1da3ff5131f0b4459f2634d0d2/freesolo/modeling/solov2/solov2.py#L980
with this
feature_add_all_level = self.convs_all_levels[i](mask_feat) + feature_add_all_level
This happened to me. I fixed it by replacing the following line in solov2.py, line 981
https://github.com/NVlabs/FreeSOLO/blob/176d7fd580bbfe1da3ff5131f0b4459f2634d0d2/freesolo/modeling/solov2/solov2.py#L980
with this
feature_add_all_level = self.convs_all_levels[i](mask_feat) + feature_add_all_level
It works. Thank you!
Thank you @ninasinger. I have updated the code.