-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
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
Add autobatch
feature for best batch-size
estimation
#5092
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glenn-jocher
changed the title
Feature/auto batch
Add Oct 8, 2021
autobatch
feature for best batch-size
estimation
github-actions
bot
force-pushed
the
feature/auto_batch
branch
from
October 8, 2021 06:29
ae58dfc
to
4d06df9
Compare
glenn-jocher
force-pushed
the
feature/auto_batch
branch
2 times, most recently
from
October 23, 2021 12:05
152a1fc
to
f414133
Compare
1 task
This was referenced Nov 17, 2021
Closed
2 tasks
This was referenced Feb 3, 2022
Merged
1 task
1 task
This was referenced May 18, 2022
Closed
1 task
1 task
1 task
BjarneKuehl
pushed a commit
to fhkiel-mlaip/yolov5
that referenced
this pull request
Aug 26, 2022
…#5092) * Autobatch * fix mem * fix mem2 * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update * Update train.py * print result * Cleanup print result * swap fix in call * to 64 * use total * fix * fix * fix * fix * fix * Update * Update * Update * Update * Update * Update * Update * Cleanup printing * Update final printout * Update autobatch.py * Update autobatch.py * Update autobatch.py
2 tasks
This was referenced Sep 7, 2022
2 tasks
This was referenced Oct 25, 2022
1 task
1 task
2 tasks
2 tasks
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds YOLOv5 autobatch feature to solve for best batch size on CUDA devices by passing
--batch-size -1
to train.py:Limitations
train.py
@kalenmike @stefani-kovachevska @AyushExel
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Introduced automatic batch size estimation for YOLOv5 training on single GPU setups.
📊 Key Changes
check_train_batch_size
to estimate the optimal training batch size.train.py
to enable batch size auto-tuning when a batch size of-1
is specified for single-GPU training.utils/autobatch.py
which contains theautobatch
function to facilitate batch size estimation based on available GPU memory.utils/torch_utils.py
by commenting out a debug print statement.🎯 Purpose & Impact