longcw / RoIAlign.pytorch

RoIAlign & crop_and_resize for PyTorch
555 stars 103 forks source link

RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at torch/csrc/cuda/Module.cpp:267 #10

Open GeoffreyChen777 opened 6 years ago

GeoffreyChen777 commented 6 years ago

I use your Roialign in my code, and I got this error, RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at torch/csrc/cuda/Module.cpp:267

I tried the roialign in pytorch-faster-rcnn and got no error.

Thank you.

Yozey commented 5 years ago

I think one of the problem might be that all of the three parameters (images, bboxes, bb_index) should be on the same devices. I resolve my illegal memory access problem by moving bb_index to the cuda devices by bb_index.to(torch.device("cuda" if torch.cuda.is_available() else "cpu"))

tq1995 commented 5 years ago

there might be something wrong with your pretrained model when you copyed it to /data/pretrained_model , you'd better make sure that your pretrained model is complete and without broken in the path

ShoufaChen commented 3 years ago

Checking the image crop size may be helpful.