Commit 490b6ca5 authored by yhcao6's avatar yhcao6
Browse files

rename benchmark to cudnn_benchmark

parent dc5edc38
benchmark = True
# model settings # model settings
input_size = 300 input_size = 300
model = dict( model = dict(
...@@ -24,6 +23,7 @@ model = dict( ...@@ -24,6 +23,7 @@ model = dict(
anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2], [2]), anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2], [2]),
target_means=(.0, .0, .0, .0), target_means=(.0, .0, .0, .0),
target_stds=(0.1, 0.1, 0.2, 0.2))) target_stds=(0.1, 0.1, 0.2, 0.2)))
cudnn_benchmark = True
train_cfg = dict( train_cfg = dict(
assigner=dict( assigner=dict(
type='MaxIoUAssigner', type='MaxIoUAssigner',
......
benchmark = True
# model settings # model settings
input_size = 512 input_size = 512
model = dict( model = dict(
...@@ -24,6 +23,7 @@ model = dict( ...@@ -24,6 +23,7 @@ model = dict(
anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2, 3], [2], [2]), anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2, 3], [2], [2]),
target_means=(.0, .0, .0, .0), target_means=(.0, .0, .0, .0),
target_stds=(0.1, 0.1, 0.2, 0.2))) target_stds=(0.1, 0.1, 0.2, 0.2)))
cudnn_benchmark = True
train_cfg = dict( train_cfg = dict(
assigner=dict( assigner=dict(
type='MaxIoUAssigner', type='MaxIoUAssigner',
......
benchmark = True
# model settings # model settings
input_size = 300 input_size = 300
model = dict( model = dict(
...@@ -24,6 +23,7 @@ model = dict( ...@@ -24,6 +23,7 @@ model = dict(
anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2], [2]), anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2], [2]),
target_means=(.0, .0, .0, .0), target_means=(.0, .0, .0, .0),
target_stds=(0.1, 0.1, 0.2, 0.2))) target_stds=(0.1, 0.1, 0.2, 0.2)))
cudnn_benchmark = True
train_cfg = dict( train_cfg = dict(
assigner=dict( assigner=dict(
type='MaxIoUAssigner', type='MaxIoUAssigner',
......
benchmark = True
# model settings # model settings
input_size = 512 input_size = 512
model = dict( model = dict(
...@@ -24,6 +23,7 @@ model = dict( ...@@ -24,6 +23,7 @@ model = dict(
anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2, 3], [2], [2]), anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2, 3], [2], [2]),
target_means=(.0, .0, .0, .0), target_means=(.0, .0, .0, .0),
target_stds=(0.1, 0.1, 0.2, 0.2))) target_stds=(0.1, 0.1, 0.2, 0.2)))
cudnn_benchmark = True
train_cfg = dict( train_cfg = dict(
assigner=dict( assigner=dict(
type='MaxIoUAssigner', type='MaxIoUAssigner',
......
...@@ -66,6 +66,9 @@ def main(): ...@@ -66,6 +66,9 @@ def main():
raise ValueError('The output file must be a pkl file.') raise ValueError('The output file must be a pkl file.')
cfg = mmcv.Config.fromfile(args.config) cfg = mmcv.Config.fromfile(args.config)
# set cudnn_benchmark
if cfg.get('cudnn_benchmark', False):
torch.backends.cudnn.benchmark = True
cfg.model.pretrained = None cfg.model.pretrained = None
cfg.data.test.test_mode = True cfg.data.test.test_mode = True
......
...@@ -43,8 +43,8 @@ def main(): ...@@ -43,8 +43,8 @@ def main():
args = parse_args() args = parse_args()
cfg = Config.fromfile(args.config) cfg = Config.fromfile(args.config)
# set benchmark # set cudnn_benchmark
if cfg.get('benchmark', False): if cfg.get('cudnn_benchmark', False):
torch.backends.cudnn.benchmark = True torch.backends.cudnn.benchmark = True
# update configs according to CLI args # update configs according to CLI args
if args.work_dir is not None: if args.work_dir is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment