How export the pt model to onnx?
chenscottus opened this issue · comments
Hello,
How can I export the pt model to onnx?
I use yolov8 export. But there are a few errors I cannot fix .
Thanks!
-Scott
I solved these two issues:
AttributeError: Can't get attribute 'YOLO' on <module 'nets.nn'
ModuleNotFoundError: No module named 'utils'
But I got:
args = {**DEFAULT_CFG_DICT, **ckpt['train_args']} # combine model and default args, preferring model args
Hello,
Thanks for raising an issue.
You can check the code for exporting the model to onnx
format
Here is the error when I use you latest code to export to onnx:
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
Thanks!
This error happens because of the torch version when you load pre-trained weights.
Please follow the readme file.