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

AutoShape explicit arguments fix #9443

Merged
merged 2 commits into from
Sep 16, 2022
Merged

AutoShape explicit arguments fix #9443

merged 2 commits into from
Sep 16, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 16, 2022

May resolve #9442

Signed-off-by: Glenn Jocher glenn.jocher@ultralytics.com

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refinement of inference code path and logging in YOLOv5.

πŸ“Š Key Changes

  • Simplified argument passing by specifying augment keyword explicitly during model inference.
  • Ensured shape is always a tuple to prevent potential type-related errors.
  • Switched from using the built-in print function to a LOGGER.info for more consistent and configurable logging across the module.

🎯 Purpose & Impact

  • Cleaner Code: Specifying augment explicitly as a keyword argument adds clarity to the function call which can reduce future bugs and make the code easier to understand.
  • Type Safety: Converting the shape to a tuple enforces consistency in datatype, which enhances code stability.
  • Improved Logging: Adopting LOGGER.info over print paves the way for more advanced logging features such as logging levels, timestamps, and log file management, resulting in better debugging and monitoring experiences for users.

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher self-assigned this Sep 16, 2022
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher merged commit 2ac4b63 into master Sep 16, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch September 16, 2022 15:25
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.

Typo in BaseModel._forward_once
1 participant