ucbdrive / few-shot-object-detection

Implementations of few-shot object detection benchmarks
Apache License 2.0
1.1k stars 223 forks source link

RuntimeError: CUDA error: invalid device function (ROIAlign_forward_cuda at ...) #129

Closed a07913838438 closed 3 years ago

a07913838438 commented 3 years ago

Thanks for your great projects and Thanks for share the code of your great work! My enviroment torch:1.4.0 torchvision:0.5.0 cuda:10.0 I have done all the installations shown on README but still, I get his error message whenever I try to do demo.py RuntimeError: CUDA error: invalid device function(......) can you give me any advice?thanks very much.

shreyas-afk commented 3 years ago

It might be because torch and cuda version required is incompatible (mine was same issue but with detectron2), after a lot of trial and error i found that this combination works pip install torch==1.5.0+cu101 torchvision==0.6+cu101 -f https://download.pytorch.org/whl/torch_stable.html

thomasehuang commented 3 years ago

As @shreyas-afk said, this is probably due to incompatibility issues. Once you install pytorch for your cuda version, you can refer to this page for the correct pre-built version of detectron2 that we use.

The README is a little outdated, so following it exactly may lead to packages being incompatible with the rest of the code base. I'll update it and you can try to follow it again and see if you still run into the issues.

thomasehuang commented 3 years ago

Just updated the installation instructions, you can try following it again. Will close this for now, but feel free to reopen it if it's still an issue for you.