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

The trained model export onnx is too large #12284

Closed
1 task done
Rorschaaaach opened this issue Oct 26, 2023 · 2 comments
Closed
1 task done

The trained model export onnx is too large #12284

Rorschaaaach opened this issue Oct 26, 2023 · 2 comments
Labels
question Further information is requested Stale Stale and schedule for closing soon

Comments

@Rorschaaaach
Copy link

Search before asking

Question

i use:
python export.py --weights runs/train/v1/weights/best.pt --include onnx
export the onnx model, runs/train/v1/weights/best.pt model is only 14M but onnx model is 28M, so why export model so large? I didn't use --half because the model was used on the CPU.

Additional

No response

@Rorschaaaach Rorschaaaach added the question Further information is requested label Oct 26, 2023
@glenn-jocher
Copy link
Member

@Rorschaaaach hi there,

The size of the exported ONNX model can be larger than the original PyTorch weights due to differences in serialization formats and optimizations performed by ONNX. The larger size is not indicative of any performance issues.

If you want to reduce the size of the exported ONNX model further, you can try quantization techniques offered by frameworks like ONNXRuntime or OpenVINO. These techniques can help to reduce the model size without significantly affecting the inference performance.

Feel free to explore these options, and let us know if you have any further questions.

Best regards.

Copy link
Contributor

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

@github-actions github-actions bot added the Stale Stale and schedule for closing soon label Nov 26, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale Stale and schedule for closing soon
Projects
None yet
Development

No branches or pull requests

2 participants