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

Dynamic normalization layer selection #7392

Merged
merged 2 commits into from
Apr 12, 2022
Merged

Dynamic normalization layer selection #7392

merged 2 commits into from
Apr 12, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Apr 12, 2022

Based on actual available layers. Torch 1.7 compatible, resolves #7381

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved normalization layer detection in training script.

πŸ“Š Key Changes

  • Refactored the way normalization layers are defined by programmatically identifying any nn.Module that contains 'Norm' in its name.

🎯 Purpose & Impact

  • Simplifies Code Maintenance: Automates the inclusion of new normalization layers from PyTorch in the future without manual updates.
  • Ensures Consistency: Reduces the risk of human error in maintaining the list of normalization layers.
  • Potential to Improve Model Training: By being able to recognize and handle all types of normalization layers, there may be subtle improvements in model optimization.

Based on actual available layers. Torch 1.7 compatible, resolves #7381
@glenn-jocher glenn-jocher self-assigned this Apr 12, 2022
@glenn-jocher glenn-jocher merged commit 4bb7eb8 into master Apr 12, 2022
@glenn-jocher glenn-jocher deleted the update/norm branch April 12, 2022 09:02
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Dynamic normalization layer selection

Based on actual available layers. Torch 1.7 compatible, resolves ultralytics#7381

* Update train.py
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.

LazyInstanceNorm2d need torch>=1.10
1 participant