Skip to content

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jul 30, 2022

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhanced model compatibility and cleaned up outdated code in YOLOv5.

📊 Key Changes

  • 🧹 Removed compatibility code for older PyTorch version (1.6.0) in Conv class.
  • ✔️ Ensured nn.Upsample class is compatible with newer PyTorch version (1.11.0) by adding a check for the recompute_scale_factor attribute.

🎯 Purpose & Impact

  • 🔍 The removal of outdated compatibility code makes the codebase cleaner and potentially reduces maintenance overhead.
  • 🚀 Ensuring compatibility with newer versions of PyTorch prevents future deprecation issues, likely improving user experience and future-proofing the code.
  • ✅ Users can have confidence in using YOLOv5 with the latest tech, maintaining performance and functionality.

@glenn-jocher glenn-jocher changed the title Deprecate torch 1.6.0 compat _non_persistent_buffers_set Deprecate torch 1.6.0 compat _non_persistent_buffers_set Jul 30, 2022
@glenn-jocher glenn-jocher merged commit 7921351 into master Jul 30, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch July 30, 2022 19:25
@glenn-jocher glenn-jocher self-assigned this Jul 30, 2022
@glenn-jocher
Copy link
Member Author

Verified with

!git clone https://github.com/ultralytics/yolov5 -b glenn-jocher-patch-1 # clone
%cd yolov5
%pip install -r requirements.txt torch==1.7.0 torchvision==0.8.1  # install

ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
…cs#8797)

Deprecate torch 1.6.0 compat _non_persistent_buffers_set
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