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

Error Demo CPU, not CUDA #54

Closed
NguyenDangBinh opened this issue Jan 9, 2019 · 16 comments
Closed

Error Demo CPU, not CUDA #54

NguyenDangBinh opened this issue Jan 9, 2019 · 16 comments

Comments

@NguyenDangBinh
Copy link

I use CPU, not GPU, not CUDA.
I use Anaconda, Spider to build demo.py. I had a error:

File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\torch\serialization.py", line 78, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '

RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location='cpu' to map your storages to the CPU.

Can you help me?

@NguyenDangBinh NguyenDangBinh changed the title error Demo CPU, not CUDA Error Demo CPU, not CUDA Jan 9, 2019
@xingyizhou
Copy link
Owner

Hi,
Thanks for the report! The current version should work on CPU. b8afd10#diff-30a30f8b61024bfe24b090332ccda819R20 .

@NguyenDangBinh
Copy link
Author

dear,
thank you for the report but i still have the error like that
I run demo.py
AssertionError:
Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx
You help me.

@NguyenDangBinh
Copy link
Author

runfile('D:/pytorch-pose-hg-3d-master/src/demo.py', wdir='D:/pytorch-pose-hg-3d-master/src')
Reloaded modules: models.msra_resnet, utils.debugger, utils, model, utils.eval, models, opts, utils.image, _init_paths
heads {'hm': 16}
=> using msra resnet 'msra_50'
=> loading pretrained model https://download.pytorch.org/models/resnet50-19c8e357.pth
loaded: D:/pytorch-pose-hg-3d-master/models/fusion_3d_var.pth, epoch: 10
Traceback (most recent call last):

File "", line 1, in
runfile('D:/pytorch-pose-hg-3d-master/src/demo.py', wdir='D:/pytorch-pose-hg-3d-master/src')

File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 668, in runfile
execfile(filename, namespace)

File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "D:/pytorch-pose-hg-3d-master/src/demo.py", line 81, in
main(opt)

File "D:/pytorch-pose-hg-3d-master/src/demo.py", line 62, in main
model = model.to(opt.device)

File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\torch\nn\modules\module.py", line 381, in to
return self._apply(convert)

File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\torch\nn\modules\module.py", line 187, in _apply
module._apply(fn)

File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\torch\nn\modules\module.py", line 193, in _apply
param.data = fn(param.data)

File "C:\Users\user\Anaconda3\envs\tensorflow\lib\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 "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\torch\cuda_init_.py", line 161, in _lazy_init
_check_driver()

File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\torch\cuda_init_.py", line 82, in _check_driver
http://www.nvidia.com/Download/index.aspx""")

AssertionError:
Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx

@xingyizhou
Copy link
Owner

Hi,
What is your commend to run the demo? You should add --gpus -1 for cpu mode.

@NguyenDangBinh
Copy link
Author

I run demo.py on Spider( Anaconda).
I dont know how to add --gpus -1?

@NguyenDangBinh
Copy link
Author

image

@NguyenDangBinh
Copy link
Author

I run in Anaconda Pompt below
image

@Peter654q
Copy link

Hi,
Maybe you can try the command like:
"python3 src/demo.py --demo images/h36m_1214.png --gpu -1 --load_model models/fusion_3d_var.pth"

@NguyenDangBinh
Copy link
Author

dear,
What is this?
image

@NguyenDangBinh
Copy link
Author

dear,
If you have a free time, can you help me with teamviewer software?

@xingyizhou
Copy link
Owner

Hi,
It seems that the indent of your screen-shot has been changed from my code. Can you try deleting two spaces for line 69-72 and adding one space to line 74-76? I don't know how to use teamviewer.

@NguyenIvan
Copy link

Hi Binh,
I am also into this Pose Recognition Repo. I can run it with 0.4 and CPU. If you are in Ho Chi Minh I can help you out. Email me at nguyen.le@qhoach.com.
Nguyen

@NguyenIvan
Copy link

Chào bạn NguyenDangBinh,
Tôi đã nghiên cứu công nghệ này 5 năm để ứng dụng vào võ thuật nên không lạ gì nó. Nếu bạn tìm sự giúp đỡ tôi có thể giúp bạn. Bạn đang ở Tp nào?
Nguyên.

@NguyenDangBinh
Copy link
Author

chào anh Nguyên,
Em ở Bình Thạnh, Em đang nghiên cứu cái này cho ứng dụng chăm sóc người già, em làm đề cương luận văn thạc sỷ, trước đó em đã đi làm vài năm rồi. Nền của em là Lập trình nhúng và tự động hóa.
Em đang rất cần sự giúp đỡ từ anh, rất vui được quen biết anh.
Bình

@NguyenDangBinh
Copy link
Author

Hi,
It seems that the indent of your screen-shot has been changed from my code. Can you try deleting two spaces for line 69-72 and adding one space to line 74-76? I don't know how to use teamviewer.
Dear,
Teamviewer is a sorfware which can connect 2 laptop each other.
I have error about UnboundLocalError that you can see at image below:
image
How to fix it

@NguyenDangBinh
Copy link
Author

I fixed it

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

4 participants