FreeSOLO icon indicating copy to clipboard operation
FreeSOLO copied to clipboard

The training error

Open wavinflaghxm opened this issue 3 years ago • 3 comments

Hello, I meet an error when training freesolo: RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation...

wavinflaghxm avatar May 10 '22 11:05 wavinflaghxm

I also had the same error- while trying to train in single GPU with batchsize of 2.

mokcho avatar May 21 '22 11:05 mokcho

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

ninasinger avatar May 28 '22 18:05 ninasinger

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!

wavinflaghxm avatar May 29 '22 09:05 wavinflaghxm

Thank you @ninasinger. I have updated the code.

WXinlong avatar Sep 25 '22 09:09 WXinlong