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

Do not optimize CoreML TorchScript model #3055

Merged
merged 1 commit into from
May 6, 2021
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 6, 2021

Fixes CoreML export error introduced in PR 'Default optimize_for_mobile() on TorchScript models' #2908

Mobile-optimized TorchScript model is now saved to disk but not saved locally, and thus is not used later in CoreML export.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Optimization step streamlined in torchscript model export.

📊 Key Changes

  • The optimize_for_mobile function's output is now directly saved without storing it in a variable.

🎯 Purpose & Impact

  • 👩‍💻 Reduces code complexity, making it simpler and easier to maintain.
  • 🔍 Ensures the export process is more succinct and possibly slightly faster.
  • 🚀 Users exporting models to TorchScript for mobile deployment now have a neater codebase to work with, with unchanged functionality.

@glenn-jocher glenn-jocher merged commit 3ef3a95 into master May 6, 2021
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-5 branch May 6, 2021 15:23
@glenn-jocher glenn-jocher self-assigned this May 6, 2021
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
danny-schwartz7 pushed a commit to danny-schwartz7/yolov5 that referenced this pull request May 22, 2021
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
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

Successfully merging this pull request may close these issues.

CoreML Export Error: export failure: 'torch._C.Node' object has no attribute 'ival'
1 participant