Skip to content

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