Skip to content

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 13, 2022

Improved robustness in reading input channel count.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improvements in model pruning and information utilities.

πŸ“Š Key Changes

  • Replaced a print statement with a LOGGER.info call for model pruning feedback.
  • Made the model pruning step permanent within the same function.
  • Refactored model_info function to use imgsz as the argument name instead of img_size.
  • Updated FLOPs calculation in model_info with more concise and efficient code.
  • Changed the FLOPs calculation to use a copied model instance, providing stride and image size flexibility.

🎯 Purpose & Impact

  • Enhances codebase consistency and compliance with standardized logging.
  • Simplifies the model pruning process from a user standpoint.
  • Improves code readability and maintainability by unifying argument nomenclature.
  • Optimizes performance analysis calculations to better estimate computational requirements.
  • Users will benefit from clearer reporting on model pruning and a more accurate calculation of computational costs related to model complexity and inference speed.

Improved robustness in reading input channel count
@glenn-jocher glenn-jocher self-assigned this Aug 13, 2022
@glenn-jocher glenn-jocher merged commit 6aed0a7 into master Aug 13, 2022
@glenn-jocher glenn-jocher deleted the update/FLOPs branch August 13, 2022 14:38
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* GFLOPs computation fix for classification models

Improved robustness in reading input channel count

* Update torch_utils.py

* Update torch_utils.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.

1 participant