bingykang / Fewshot_Detection

Few-shot Object Detection via Feature Reweighting
https://arxiv.org/abs/1812.01866
526 stars 111 forks source link

Does the cuda have some require? #36

Open NingWang11 opened 4 years ago

NingWang11 commented 4 years ago

Excese me ,thanks for your code,butwhen i run the base train,i have 'a question like that'===> Number of samples (before filtring): 4952 ===> Number of samples (after filtring): 4952 ('num classes: ', 15) factor: 3.0 THCudaCheck FAIL file=/pytorch/torch/lib/THC/THCGeneral.c line=70 error=38 : no CUDA-capable device is detected Traceback (most recent call last): File "train_meta.py", line 142, in model = torch.nn.DataParallel(model).cuda() File "/home/wangning/anaconda3/envs/python27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 216, in cuda return self._apply(lambda t: t.cuda(device)) File "/home/wangning/anaconda3/envs/python27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 146, in _apply module._apply(fn) File "/home/wangning/anaconda3/envs/python27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 146, in _apply module._apply(fn) File "/home/wangning/anaconda3/envs/python27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 146, in _apply module._apply(fn) File "/home/wangning/anaconda3/envs/python27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 146, in _apply module._apply(fn) File "/home/wangning/anaconda3/envs/python27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 152, in _apply param.data = fn(param.data) File "/home/wangning/anaconda3/envs/python27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 216, in return self._apply(lambda t: t.cuda(device)) File "/home/wangning/anaconda3/envs/python27/lib/python2.7/site-packages/torch/_utils.py", line 69, in _cuda return newtype(self.size()).copy(self, async) File "/home/wangning/anaconda3/envs/python27/lib/python2.7/site-packages/torch/cuda/init.py", line 384, in _lazy_new _lazy_init() File "/home/wangning/anaconda3/envs/python27/lib/python2.7/site-packages/torch/cuda/init.py", line 142, in _lazy_init torch._C._cuda_init() RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /pytorch/torch/lib/THC/THCGeneral.c:70'

my cuda is 9.1,is it not fit the python2.7 and torch0.3.1?Looking forward to your reply.Thank you.

DanielDworakowski commented 4 years ago

I got around this error by setting gpus=0 inside the metayolo.data file. I believe GPUs are 0 indexed when you are setting CUDA_VISIBLE_DEVICES