Skip to content

Conversation

glenn-jocher
Copy link
Member

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

Avoid empty lists on missing BathNorm2d models as in #7375

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refactor optimizer parameter grouping for increased clarity in train.py.

πŸ“Š Key Changes

  • Simplified the variable naming for optimizer parameter groups from g0, g1, g2 to a single list g.
  • Changed parameter group assignments within the optimizer initialization to refer to the new g list indices.
  • Updated the parameter group addition to the optimizer to match the new grouping method.
  • Clarified logging output to reflect these changes by adjusting the counts for each parameter group.

🎯 Purpose & Impact

  • Purpose: To streamline the readability and maintenance of the optimizer parameter grouping by using a single list with indices rather than separate variables.
  • Potential Impact: This change should make the code more maintainable and understandable for developers contributing to or reviewing the train.py script, without affecting the end users' experience or the functionality of the training process.

Avoid empty lists on missing BathNorm2d models as in #7375
@glenn-jocher glenn-jocher self-assigned this Apr 11, 2022
@glenn-jocher glenn-jocher merged commit bd2dda8 into master Apr 11, 2022
@glenn-jocher glenn-jocher deleted the update/pg branch April 11, 2022 10:34
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Update optimizer param group strategy

Avoid empty lists on missing BathNorm2d models as in ultralytics#7375

* fix init
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.

ValueError: optimizer got an empty parameter list when using group normalization instead of batch normalization in yolov5

1 participant