Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when i run test i, ihave meet some problems #7

Open
ZZH2950228 opened this issue Nov 18, 2019 · 2 comments
Open

when i run test i, ihave meet some problems #7

ZZH2950228 opened this issue Nov 18, 2019 · 2 comments

Comments

@ZZH2950228
Copy link

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

@ghost
Copy link

ghost commented Jun 22, 2020

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

@redrock303
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants