WongKinYiu / ScaledYOLOv4

Scaled-YOLOv4: Scaling Cross Stage Partial Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When I run the test.py in docker, one issue appeared.

s2244521 opened this issue · comments

When I run test.py (CSP) in docker, there is an issue appeared.
Traceback (most recent call last):
File "test.py", line 330, in
save_conf=opt.save_conf,
File "test.py", line 55, in test
device = select_device(opt.device, batch_size=batch_size)
File "/yolo/yolov4/utils/torch_utils.py", line 47, in select_device
assert torch.cuda.is_available(), 'CUDA unavailable, invalid device %s requested' % device # check availablity
AssertionError: CUDA unavailable, invalid device 0 requested
I don't know how to solve it, did someone meet this issue?

hi @Qiqiguaiguaide
I solved this problem, I changed the device to cpu and it works. I think it because my CUDA version and pytorch version can not match the environment setting of this code. My CUDA version is 12.