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

cuda problem when tying to inference #22

Open
yalyzak opened this issue Sep 19, 2023 · 1 comment
Open

cuda problem when tying to inference #22

yalyzak opened this issue Sep 19, 2023 · 1 comment

Comments

@yalyzak
Copy link

yalyzak commented Sep 19, 2023

File "inference.py", line 285, in
main(opt)
File "inference.py", line 273, in main
detect3d(
File "inference.py", line 71, in detect3d
regressor = regressor_factorymodel_select.cuda()
File "C:\Users\yalyz\miniconda3\envs\yolo3d\lib\site-packages\torch\nn\modules\module.py", line 491, in cuda
return self._apply(lambda t: t.cuda(device))
File "C:\Users\yalyz\miniconda3\envs\yolo3d\lib\site-packages\torch\nn\modules\module.py", line 387, in _apply
module._apply(fn)
File "C:\Users\yalyz\miniconda3\envs\yolo3d\lib\site-packages\torch\nn\modules\module.py", line 387, in _apply
module._apply(fn)
File "C:\Users\yalyz\miniconda3\envs\yolo3d\lib\site-packages\torch\nn\modules\module.py", line 409, in _apply
param_applied = fn(param)
File "C:\Users\yalyz\miniconda3\envs\yolo3d\lib\site-packages\torch\nn\modules\module.py", line 491, in
return self.apply(lambda t: t.cuda(device))
File "C:\Users\yalyz\miniconda3\envs\yolo3d\lib\site-packages\torch\cuda_init
.py", line 164, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
i tried it on a computer with and without cude and still faced the same issue

@yalyzak yalyzak changed the title cuda problem cuda problem when tying to inference Sep 19, 2023
@TowerPro
Copy link

TowerPro commented Dec 7, 2023

it seems the saved weight file(*.pkl) saves cuda device in the dict, you can ignore the device so can select device in other computers

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