RankSRGAN icon indicating copy to clipboard operation
RankSRGAN copied to clipboard

when i run test i, ihave meet some problems

Open ZZH2950228 opened this issue 4 years ago • 2 comments

Traceback (most recent call last): File "test.py", line 35, in model = create_model(opt) File "/home/zzh/桌面/RankSRGAN/codes/models/init.py", line 19, in create_model m = M(opt) File "/home/zzh/桌面/RankSRGAN/codes/models/SR_model.py", line 26, in init self.netG = networks.define_G(opt).to(self.device) File "/home/zzh/anaconda3/envs/py13/lib/python3.6/site-packages/torch/nn/modules/module.py", line 381, in to return self._apply(convert) File "/home/zzh/anaconda3/envs/py13/lib/python3.6/site-packages/torch/nn/modules/module.py", line 187, in _apply module._apply(fn) File "/home/zzh/anaconda3/envs/py13/lib/python3.6/site-packages/torch/nn/modules/module.py", line 193, in _apply param.data = fn(param.data) File "/home/zzh/anaconda3/envs/py13/lib/python3.6/site-packages/torch/nn/modules/module.py", line 379, in convert return t.to(device, dtype if t.is_floating_point() else None, non_blocking) File "/home/zzh/anaconda3/envs/py13/lib/python3.6/site-packages/torch/cuda/init.py", line 162, in _lazy_init torch._C._cuda_init() RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /opt/conda/conda-bld/pytorch_1544174967633/work/aten/src/THC/THCGeneral.cpp:51

ZZH2950228 avatar Nov 18 '19 11:11 ZZH2950228

请问你解决了这个问题吗?

ghost avatar Jun 22 '20 07:06 ghost

config 里面有一个设置GPUID的,他默认是用三号显卡,如果你机器少于3块卡,就会报这个错误。

redrock303 avatar Nov 02 '20 11:11 redrock303