RoIAlign.pytorch icon indicating copy to clipboard operation
RoIAlign.pytorch copied to clipboard

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

Open GeoffreyChen777 opened this issue 7 years ago • 3 comments
trafficstars

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.

GeoffreyChen777 avatar Mar 26 '18 07:03 GeoffreyChen777

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"))

Yozey avatar Oct 26 '18 16:10 Yozey

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

tq1995 avatar Dec 14 '18 05:12 tq1995

Checking the image crop size may be helpful.

ShoufaChen avatar Dec 19 '20 06:12 ShoufaChen