Skip to content

Commit 490b6ca

Browse files
committed
rename benchmark to cudnn_benchmark
1 parent dc5edc3 commit 490b6ca

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

configs/pascal_voc/ssd300_voc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
benchmark = True
21
# model settings
32
input_size = 300
43
model = dict(
@@ -24,6 +23,7 @@
2423
anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2], [2]),
2524
target_means=(.0, .0, .0, .0),
2625
target_stds=(0.1, 0.1, 0.2, 0.2)))
26+
cudnn_benchmark = True
2727
train_cfg = dict(
2828
assigner=dict(
2929
type='MaxIoUAssigner',

configs/pascal_voc/ssd512_voc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
benchmark = True
21
# model settings
32
input_size = 512
43
model = dict(
@@ -24,6 +23,7 @@
2423
anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2, 3], [2], [2]),
2524
target_means=(.0, .0, .0, .0),
2625
target_stds=(0.1, 0.1, 0.2, 0.2)))
26+
cudnn_benchmark = True
2727
train_cfg = dict(
2828
assigner=dict(
2929
type='MaxIoUAssigner',

configs/ssd300_coco.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
benchmark = True
21
# model settings
32
input_size = 300
43
model = dict(
@@ -24,6 +23,7 @@
2423
anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2], [2]),
2524
target_means=(.0, .0, .0, .0),
2625
target_stds=(0.1, 0.1, 0.2, 0.2)))
26+
cudnn_benchmark = True
2727
train_cfg = dict(
2828
assigner=dict(
2929
type='MaxIoUAssigner',

configs/ssd512_coco.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
benchmark = True
21
# model settings
32
input_size = 512
43
model = dict(
@@ -24,6 +23,7 @@
2423
anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2, 3], [2], [2]),
2524
target_means=(.0, .0, .0, .0),
2625
target_stds=(0.1, 0.1, 0.2, 0.2)))
26+
cudnn_benchmark = True
2727
train_cfg = dict(
2828
assigner=dict(
2929
type='MaxIoUAssigner',

tools/test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ def main():
6666
raise ValueError('The output file must be a pkl file.')
6767

6868
cfg = mmcv.Config.fromfile(args.config)
69+
# set cudnn_benchmark
70+
if cfg.get('cudnn_benchmark', False):
71+
torch.backends.cudnn.benchmark = True
6972
cfg.model.pretrained = None
7073
cfg.data.test.test_mode = True
7174

tools/train.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def main():
4343
args = parse_args()
4444

4545
cfg = Config.fromfile(args.config)
46-
# set benchmark
47-
if cfg.get('benchmark', False):
46+
# set cudnn_benchmark
47+
if cfg.get('cudnn_benchmark', False):
4848
torch.backends.cudnn.benchmark = True
4949
# update configs according to CLI args
5050
if args.work_dir is not None:

0 commit comments

Comments
 (0)