joyhsu0504 / darcnn

MIT License
5 stars 1 forks source link

Error SelectBackward0 is a view and is being modified inplace #1

Closed GarrettJenkinson closed 1 year ago

GarrettJenkinson commented 1 year ago

Hi thanks for the interesting paper and open sourcing the code here.

I am getting the following error when following along in the notebook:

191 assert torch.isfinite(self.tensor).all(), "Box tensor contains infinite or NaN!"
192 h, w = box_size
--> 193 self.tensor[:, 0].clamp_(min=0, max=w)
194 self.tensor[:, 1].clamp_(min=0, max=h)
195 self.tensor[:, 2].clamp_(min=0, max=w)

RuntimeError: Output 0 of SelectBackward0 is a view and is being modified inplace. This view is the output of a function that 
returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace 
operation by an out-of-place one.

This is in the first training step. It seems as though my models weights all load successfully and the data sets (custom and coco) get loaded ok. Any thoughts on the issue here? If not, it would be great if you could provide instructions on how to get the input data and model weights exactly as you have it in the tutorial so as to have a reproducible example I could try before moving on to my own data.

joyhsu0504 commented 1 year ago

Hi, thanks for reaching out! Unfortunately, I haven’t seen the error you mentioned. I’m attaching here a link to the preprocessed data for stage 1 training, which includes (1) class_agnostic_weights.pth, which should be loaded into cfg.MODEL.WEIGHTS; (2) coco_dict.p, which should be loaded into coco_dataset_dict, the corresponding images files are from coco/train2017/; (3) bbbc_unlabelled_dict.p, which should be loaded into cryo_dataset_dict; and (4) bbbc_10k_256.zip, the corresponding image files for bbbc, you will need to rename the file paths depending on where you store the files. Thanks!

GarrettJenkinson commented 1 year ago

Thank you! I will give this a try, very much appreciated. I will close out this issue as this sounds like what I need to step through your notebook