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

PyTorch 1.11.0 compatibility updates #1914

Merged
merged 4 commits into from
Mar 10, 2022
Merged

PyTorch 1.11.0 compatibility updates #1914

merged 4 commits into from
Mar 10, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Mar 10, 2022

Resolves AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor' first raised in ultralytics/yolov5#5499 and observed in all CI runs on just-released PyTorch 1.11.0.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced model loading compatibility and code simplification in YOLOv3.

πŸ“Š Key Changes

  • 🧩 Unified model loading process for both fused and un-fused models.
  • πŸ” Simplified evaluation mode setting for loaded models.
  • ✨ Improved code readability by using conditional expressions.
  • πŸ›  Added compatibility updates for various PyTorch versions, including 1.6.0, 1.7.0, and 1.11.0.

🎯 Purpose & Impact

  • πŸš€ The purpose is to streamline the model loading process, making it more efficient and readable.
  • πŸ’‘ The impact is to ensure better compatibility with different versions of PyTorch, reducing potential issues for users when loading models.
  • πŸ”— Users should experience a more resilient model loading, possibly resulting in fewer bugs or errors when working with different PyTorch versions.

Resolves `AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'` first raised in ultralytics/yolov5#5499 and observed in all CI runs on just-released PyTorch 1.11.0.
@glenn-jocher glenn-jocher self-assigned this Mar 10, 2022
@glenn-jocher glenn-jocher merged commit 7093a2b into master Mar 10, 2022
@glenn-jocher glenn-jocher deleted the update/torch_1_11 branch March 10, 2022 11:59
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.

1 participant