NVlabs / FreeSOLO

FreeSOLO for unsupervised instance segmentation, CVPR 2022
Other
312 stars 32 forks source link

The training error #3

Closed wavinflaghxm closed 1 year ago

wavinflaghxm commented 2 years ago

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

mokcho commented 2 years ago

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

ninasinger commented 2 years ago

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
wavinflaghxm commented 2 years ago

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!

WXinlong commented 1 year ago

Thank you @ninasinger. I have updated the code.