-
-
Notifications
You must be signed in to change notification settings - Fork 17.2k
Description
Search before asking
- I have searched the YOLOv5 issues and discussions and found no similar questions.
Question
I am trying to convert .pt model to onnx, it successfully gets converted to onnx without the --dynamic flag but with it, it give me some error. I have tried to debug it but haven't had a luck for now. Have anybody else faced the same issue?
Additional
Execution command followed:
python3 export.py --weights checkpoints/yolov5n.pt --device 0 --include onnx
Error:
frame #55: __libc_start_main + 0xf3 (0x7f6a3025c083 in /lib/x86_64-linux-gnu/libc.so.6)
(function ComputeConstantFolding)
ONNX: export failure: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper__index_select)
Note: Now I know it says that two device are detected but I clearly mentioned device=0 in argument and it works without dynamic flag.