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

AutoBatch protect from negative batch sizes #9048

Merged
merged 5 commits into from
Aug 20, 2022
Merged

Conversation

glenn-jocher
Copy link
Member

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

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

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced batch size selection in autobatch for more robust performance.

πŸ“Š Key Changes

  • Added a safety check to ensure the batch size does not fall below 1.

🎯 Purpose & Impact

  • Purpose: Prevents potential errors or crashes when the automatic batch calculation inadvertently suggests a batch size of zero or negative.
  • Impact: Improves the reliability of model inference by ensuring a sensible default batch size, enhancing user experience and stability across various circumstances. πŸ›‘οΈ

glenn-jocher and others added 2 commits August 20, 2022 16:13
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher self-assigned this Aug 20, 2022
@glenn-jocher glenn-jocher merged commit a409ec7 into master Aug 20, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch August 20, 2022 14:29
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* AutoBatch protect from negative batch sizes

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

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* cleanup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

None yet

1 participant