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

运行Demo出错 #61

Closed
liuwei3612 opened this issue Jul 22, 2021 · 10 comments
Closed

运行Demo出错 #61

liuwei3612 opened this issue Jul 22, 2021 · 10 comments

Comments

@liuwei3612
Copy link

(base) lw@lw-System:~/work/YOLOX$ python3 tools/demo.py image -n yolox-s -c path/to/yolox_s.pth.tar --path assets/dog.jpg --conf 0.3 --nms 0.65 --tsize 640 --save_result
2021-07-22 12:13:29 | INFO | main:219 - Args: Namespace(camid=0, ckpt='path/to/yolox_s.pth.tar', conf=0.3, demo='image', exp_file=None, experiment_name='yolox_s', fp16=False, fuse=False, name='yolox-s', nms=0.65, path='assets/dog.jpg', save_result=True, trt=False, tsize=640)
/home/lw/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
2021-07-22 12:13:29 | INFO | main:229 - Model Summary: Params: 8.97M, Gflops: 26.81

@YanChenkai
Copy link

请把-c path/to/yolox_s.pth.tar换成自己电脑权重文件的所在地...

@liuwei3612
Copy link
Author

图片

@liuwei3612
Copy link
Author

请把-c path/to/yolox_s.pth.tar换成自己电脑权重文件的所在地...

图片
我改成相应的路径后,还是报这样的错误

@YanChenkai
Copy link

YanChenkai commented Jul 22, 2021

@liuwei3612 请大佬来解决吧,剩下的我不懂

如果正常的话,在打印出summary之后
| INFO | __main__:229 - Model Summary:Params: 8.97M, Gflops: 11.33
下一步应该是load模型参数,终端输出应该是
| INFO | __main__:240 - loading checkpoint

所以可以调试一下,查看一下demo.py中第229行到第240行之间哪里有问题?

还有我是在NVIDIA的docker里运行的,没有问题,如果实在没法解决要不要试一试?

@liuwei3612
Copy link
Author

@liuwei3612 请大佬来解决吧,剩下的我不懂

如果正常的话,下一步应该是load模型参数,终端输出应该是
| INFO | __main__:240 - loading checkpoint

所以可以调试一下,查看一下demo.py中第229行到第240行之间哪里有问题?

还有我是在NVIDIA的docker里运行的,没有问题,如果实在没法解决要不要试一试?

谢谢

@Joker316701882
Copy link
Member

@liuwei3612 Hi, does your machine have GPU?

@liuwei3612
Copy link
Author

@liuwei3612 Hi, does your machine have GPU?

有的,只有一个

@Joker316701882
Copy link
Member

Joker316701882 commented Jul 22, 2021

Hi @liuwei3612 and all, we have updated demo.py. Many bugs are fixed. Please pull our latest branch!!
Now you can use --device cpu/gpu when running demo.py to specify the device (default CPU).

@liuwei3612
Copy link
Author

Hi @liuwei3612 and all, we have updated demo.py. Many bugs are fixed. Please pull our latest branch!!
Now you can use --device cpu/gpu when running demo.py to specify the device (default CPU).

谢谢你的回复,目前同步到最新baranch,默认的device是CPU,可以运行成功。但改成成GPU,就出错了,错误信息如下:
图片

目前我这边CUDA Version 10.1.243
工程运行的pytorch是什么版本啊,需要匹配的CUDA的版本是多少?

@Joker316701882
Copy link
Member

pytorch==1.9.0, but I think as long as >=1.7.0, it should be fine.
cuda==10.2

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

3 participants