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.7.0 Compatibility Updates #1233

Merged
merged 2 commits into from
Oct 28, 2020
Merged

PyTorch 1.7.0 Compatibility Updates #1233

merged 2 commits into from
Oct 28, 2020

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Oct 28, 2020

This PR adds torch 1.7.0 compatibility updates, and relocates 1.6.0 legacy compatibility updates to attempt_load() in experimental.py. Will update official models as well for 1.7.0 compatibility and attach to a v3.1 release soon.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhancements for model loading and inference compatibility in YOLOv5.

📊 Key Changes

  • Added autoshaping, evaluation, and fusing to the YOLOv5 model example in hubconf.py.
  • Enriched attempt_load function in experimental.py with compatibility features for different PyTorch versions.
  • Removed redundant compatibility code in yolo.py after fusing convolution and batch normalization layers.
  • Expanded activation function updates in torch_utils.py for initialization to include nn.Hardswish.

🎯 Purpose & Impact

  • Ensuring YOLOv5 models work smoother with various input types and different PyTorch versions.
  • 🚀 Potential impact includes easier model deployment, especially for users working with different versions of PyTorch or different image input formats, fostering broader adoption and user convenience.

@glenn-jocher glenn-jocher merged commit c8c5ef3 into master Oct 28, 2020
@glenn-jocher glenn-jocher deleted the torch_170 branch October 28, 2020 14:03
burglarhobbit pushed a commit to burglarhobbit/yolov5 that referenced this pull request Jan 1, 2021
* torch 1.7.0 compatibility updates

* add inference verification
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
* torch 1.7.0 compatibility updates

* add inference verification
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* torch 1.7.0 compatibility updates

* add inference verification
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