-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Improvement] set default batch_size of evaluation and testing to 1 #250
Conversation
Codecov Report
@@ Coverage Diff @@
## master #250 +/- ##
==========================================
+ Coverage 82.67% 86.59% +3.92%
==========================================
Files 95 98 +3
Lines 6867 6901 +34
Branches 1126 1113 -13
==========================================
+ Hits 5677 5976 +299
+ Misses 980 708 -272
- Partials 210 217 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
what does |
It means the |
but videos_per_gpu support val and test |
U mean it is better to change the config file by setting the |
sure, this solves the problem, isn't it? |
tools/test.py
Outdated
@@ -52,6 +52,10 @@ def parse_args(): | |||
help='override some settings in the used config, the key-value pair ' | |||
'in xxx=yyy format will be merged into config file. For example, ' | |||
"'--cfg-options model.backbone.depth=18 model.backbone.with_cp=True'") | |||
parser.add_argument( | |||
'--multi-batches', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does multi-batch mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will determine whether to set batch
as cfg.data.videos_per_gpu
first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But cfg.data.videos_per_gpu
may raise OOM, so this args provide a option for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see
tools/test.py
Outdated
@@ -128,7 +132,8 @@ def main(): | |||
# build the dataloader | |||
dataset = build_dataset(cfg.data.test, dict(test_mode=True)) | |||
dataloader_setting = dict( | |||
videos_per_gpu=cfg.data.get('videos_per_gpu', 2), | |||
videos_per_gpu=cfg.data.get('videos_per_gpu', 1) | |||
if args.multi_batches else 1, | |||
workers_per_gpu=cfg.data.get('workers_per_gpu', 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to set the default value of 'workers_per_gpu' as 1 (for better testing speed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would higher value be better?
@innerlee This PR is of high priority, old codes have bugs when performing localization testing. |
Signed-off-by: lizz <lizz@sensetime.com>
Notes: I have changed the defaults to small values. |
This PR sets default batch_size of evaluation and testing as 1 to avoid OOM and manual config changes in most cases, since it used the training
batch_size
as default whenvideos_per_gpu=cfg.data.get('videos_per_gpu', 2)