Skip to content

Commit 7e221c1

Browse files
authored
[Refactor] Add auto lr in cfg (open-mmlab#1807)
* add deploy.yaml * add auto_scale_lr in cfg * fix cfg
1 parent 9611c2d commit 7e221c1

27 files changed

+146
-0
lines changed

configs/_base_/schedules/cosine.py

+6
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@
2222
train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=40, val_interval=1)
2323
val_cfg = dict(type='ValLoop')
2424
test_cfg = dict(type='TestLoop')
25+
26+
# Default setting for scaling LR automatically
27+
# - `enable` means enable scaling LR automatically
28+
# or not by default.
29+
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
30+
auto_scale_lr = dict(enable=False, base_batch_size=16)

configs/_base_/schedules/cyclic-20e.py

+6
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@
5757
train_cfg = dict(by_epoch=True, max_epochs=20, val_interval=20)
5858
val_cfg = dict()
5959
test_cfg = dict()
60+
61+
# Default setting for scaling LR automatically
62+
# - `enable` means enable scaling LR automatically
63+
# or not by default.
64+
# - `base_batch_size` = (8 GPUs) x (4 samples per GPU).
65+
auto_scale_lr = dict(enable=False, base_batch_size=32)

configs/_base_/schedules/cyclic-40e.py

+6
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,9 @@
5959
train_cfg = dict(by_epoch=True, max_epochs=40, val_interval=1)
6060
val_cfg = dict()
6161
test_cfg = dict()
62+
63+
# Default setting for scaling LR automatically
64+
# - `enable` means enable scaling LR automatically
65+
# or not by default.
66+
# - `base_batch_size` = (8 GPUs) x (6 samples per GPU).
67+
auto_scale_lr = dict(enable=False, base_batch_size=48)

configs/_base_/schedules/mmdet-schedule-1x.py

+6
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@
2020
optim_wrapper = dict(
2121
type='OptimWrapper',
2222
optimizer=dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001))
23+
24+
# Default setting for scaling LR automatically
25+
# - `enable` means enable scaling LR automatically
26+
# or not by default.
27+
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
28+
auto_scale_lr = dict(enable=False, base_batch_size=16)

configs/_base_/schedules/schedule-2x.py

+6
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@
2828
milestones=[20, 23],
2929
gamma=0.1)
3030
]
31+
32+
# Default setting for scaling LR automatically
33+
# - `enable` means enable scaling LR automatically
34+
# or not by default.
35+
# - `base_batch_size` = (8 GPUs) x (4 samples per GPU).
36+
auto_scale_lr = dict(enable=False, base_batch_size=32)

configs/_base_/schedules/schedule-3x.py

+6
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@
2323
milestones=[24, 32],
2424
gamma=0.1)
2525
]
26+
27+
# Default setting for scaling LR automatically
28+
# - `enable` means enable scaling LR automatically
29+
# or not by default.
30+
# - `base_batch_size` = (4 GPUs) x (8 samples per GPU).
31+
auto_scale_lr = dict(enable=False, base_batch_size=32)

configs/_base_/schedules/seg-cosine-100e.py

+6
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@
1919
train_cfg = dict(by_epoch=True, max_epochs=100)
2020
val_cfg = dict(interval=1)
2121
test_cfg = dict()
22+
23+
# Default setting for scaling LR automatically
24+
# - `enable` means enable scaling LR automatically
25+
# or not by default.
26+
# - `base_batch_size` = (4 GPUs) x (32 samples per GPU).
27+
auto_scale_lr = dict(enable=False, base_batch_size=128)

configs/_base_/schedules/seg-cosine-150e.py

+6
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@
1919
train_cfg = dict(by_epoch=True, max_epochs=150)
2020
val_cfg = dict(interval=1)
2121
test_cfg = dict()
22+
23+
# Default setting for scaling LR automatically
24+
# - `enable` means enable scaling LR automatically
25+
# or not by default.
26+
# - `base_batch_size` = (8 GPUs) x (8 samples per GPU).
27+
auto_scale_lr = dict(enable=False, base_batch_size=64)

configs/_base_/schedules/seg-cosine-200e.py

+6
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@
1919
train_cfg = dict(by_epoch=True, max_epochs=200)
2020
val_cfg = dict(interval=1)
2121
test_cfg = dict()
22+
23+
# Default setting for scaling LR automatically
24+
# - `enable` means enable scaling LR automatically
25+
# or not by default.
26+
# - `base_batch_size` = (2 GPUs) x (16 samples per GPU).
27+
auto_scale_lr = dict(enable=False, base_batch_size=32)

configs/_base_/schedules/seg-cosine-50e.py

+6
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@
1919
train_cfg = dict(by_epoch=True, max_epochs=50)
2020
val_cfg = dict(interval=1)
2121
test_cfg = dict()
22+
23+
# Default setting for scaling LR automatically
24+
# - `enable` means enable scaling LR automatically
25+
# or not by default.
26+
# - `base_batch_size` = (2 GPUs) x (16 samples per GPU).
27+
auto_scale_lr = dict(enable=False, base_batch_size=32)

configs/h3dnet/h3dnet_8xb3_scannet-seg.py

+5
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,8 @@
6767
logger=dict(type='LoggerHook', interval=30)
6868
)
6969
# yapf:enable
70+
# Default setting for scaling LR automatically
71+
# - `enable` means enable scaling LR automatically
72+
# or not by default.
73+
# - `base_batch_size` = (8 GPUs) x (3 samples per GPU).
74+
auto_scale_lr = dict(enable=False, base_batch_size=24)

configs/imvotenet/imvotenet_stage2_8xb16_sunrgbd-3d.py

+5
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,8 @@
217217

218218
# may also use your own pre-trained image branch
219219
load_from = 'https://download.openmmlab.com/mmdetection3d/v0.1.0_models/imvotenet/imvotenet_faster_rcnn_r50_fpn_2x4_sunrgbd-3d-10class/imvotenet_faster_rcnn_r50_fpn_2x4_sunrgbd-3d-10class_20210323_173222-cad62aeb.pth' # noqa
220+
# Default setting for scaling LR automatically
221+
# - `enable` means enable scaling LR automatically
222+
# or not by default.
223+
# - `base_batch_size` = (8 GPUs) x (16 samples per GPU).
224+
auto_scale_lr = dict(enable=False, base_batch_size=128)

configs/parta2/PartA2_hv_secfpn_8xb2-cyclic-80e_kitti-3d-3class.py

+6
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,9 @@
127127
# Part-A2 uses a different learning rate from what SECOND uses.
128128
optim_wrapper = dict(optimizer=dict(lr=0.001))
129129
find_unused_parameters = True
130+
131+
# Default setting for scaling LR automatically
132+
# - `enable` means enable scaling LR automatically
133+
# or not by default.
134+
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
135+
auto_scale_lr = dict(enable=False, base_batch_size=16)

configs/point_rcnn/point-rcnn_8xb2_kitti-3d-3class.py

+5
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,8 @@
9494
dict(type='TensorboardLoggerHook')
9595
])
9696
# yapf:enable
97+
# Default setting for scaling LR automatically
98+
# - `enable` means enable scaling LR automatically
99+
# or not by default.
100+
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
101+
auto_scale_lr = dict(enable=False, base_batch_size=16)

configs/pointpillars/pointpillars_hv_fpn_sbn-all_8xb2-2x_lyft-3d-range100.py

+5
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
'../_base_/datasets/lyft-3d-range100.py',
44
'../_base_/schedules/schedule-2x.py', '../_base_/default_runtime.py'
55
]
6+
# Default setting for scaling LR automatically
7+
# - `enable` means enable scaling LR automatically
8+
# or not by default.
9+
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
10+
auto_scale_lr = dict(enable=False, base_batch_size=16)

configs/pointpillars/pointpillars_hv_fpn_sbn-all_8xb2-2x_lyft-3d.py

+5
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
'../_base_/datasets/lyft-3d.py', '../_base_/schedules/schedule-2x.py',
44
'../_base_/default_runtime.py'
55
]
6+
# Default setting for scaling LR automatically
7+
# - `enable` means enable scaling LR automatically
8+
# or not by default.
9+
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
10+
auto_scale_lr = dict(enable=False, base_batch_size=16)

configs/pointpillars/pointpillars_hv_secfpn_sbn-all_16xb2-2x_waymo-3d-3class.py

+5
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@
77

88
# data settings
99
data = dict(train=dict(dataset=dict(load_interval=1)))
10+
# Default setting for scaling LR automatically
11+
# - `enable` means enable scaling LR automatically
12+
# or not by default.
13+
# - `base_batch_size` = (16 GPUs) x (2 samples per GPU).
14+
auto_scale_lr = dict(enable=False, base_batch_size=32)

configs/pointpillars/pointpillars_hv_secfpn_sbn-all_16xb2-2x_waymo-3d-car.py

+5
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,8 @@
3535
code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
3636
pos_weight=-1,
3737
debug=False)))
38+
# Default setting for scaling LR automatically
39+
# - `enable` means enable scaling LR automatically
40+
# or not by default.
41+
# - `base_batch_size` = (16 GPUs) x (2 samples per GPU).
42+
auto_scale_lr = dict(enable=False, base_batch_size=32)

configs/pointpillars/pointpillars_hv_secfpn_sbn-all_16xb2-2x_waymoD5-3d-car.py

+5
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@
3232
code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
3333
pos_weight=-1,
3434
debug=False)))
35+
# Default setting for scaling LR automatically
36+
# - `enable` means enable scaling LR automatically
37+
# or not by default.
38+
# - `base_batch_size` = (16 GPUs) x (2 samples per GPU).
39+
auto_scale_lr = dict(enable=False, base_batch_size=32)

configs/pointpillars/pointpillars_hv_secfpn_sbn-all_8xb2-2x_lyft-3d-range100.py

+5
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@
4040
],
4141
rotations=[0, 1.57],
4242
reshape_out=True)))
43+
# Default setting for scaling LR automatically
44+
# - `enable` means enable scaling LR automatically
45+
# or not by default.
46+
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
47+
auto_scale_lr = dict(enable=False, base_batch_size=16)

configs/pointpillars/pointpillars_hv_secfpn_sbn-all_8xb2-2x_lyft-3d.py

+5
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@
4141
],
4242
rotations=[0, 1.57],
4343
reshape_out=True)))
44+
# Default setting for scaling LR automatically
45+
# - `enable` means enable scaling LR automatically
46+
# or not by default.
47+
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
48+
auto_scale_lr = dict(enable=False, base_batch_size=16)

configs/regnet/pointpillars_hv_regnet-400mf_fpn_sbn-all_8xb2-2x_lyft-3d.py

+5
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@
2222
norm_eval=False,
2323
style='pytorch'),
2424
pts_neck=dict(in_channels=[64, 160, 384]))
25+
# Default setting for scaling LR automatically
26+
# - `enable` means enable scaling LR automatically
27+
# or not by default.
28+
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
29+
auto_scale_lr = dict(enable=False, base_batch_size=16)

configs/regnet/pointpillars_hv_regnet-400mf_fpn_sbn-all_range100_8xb2-2x_lyft-3d.py

+5
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@
2222
norm_eval=False,
2323
style='pytorch'),
2424
pts_neck=dict(in_channels=[64, 160, 384]))
25+
# Default setting for scaling LR automatically
26+
# - `enable` means enable scaling LR automatically
27+
# or not by default.
28+
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
29+
auto_scale_lr = dict(enable=False, base_batch_size=16)

configs/second/second_hv_secfpn_sbn-all_16xb2-2x_waymoD5-3d-3class.py

+5
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,8 @@
140140
test_mode=True,
141141
metainfo=metainfo,
142142
box_type_3d='LiDAR'))
143+
# Default setting for scaling LR automatically
144+
# - `enable` means enable scaling LR automatically
145+
# or not by default.
146+
# - `base_batch_size` = (16 GPUs) x (2 samples per GPU).
147+
auto_scale_lr = dict(enable=False, base_batch_size=32)

configs/ssn/ssn_hv_secfpn_sbn-all_16xb2-2x_lyft-3d.py

+5
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,8 @@
220220
code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
221221
pos_weight=-1,
222222
debug=False)))
223+
# Default setting for scaling LR automatically
224+
# - `enable` means enable scaling LR automatically
225+
# or not by default.
226+
# - `base_batch_size` = (16 GPUs) x (2 samples per GPU).
227+
auto_scale_lr = dict(enable=False, base_batch_size=32)

configs/votenet/votenet_8xb16_sunrgbd-3d.py

+5
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@
2020
[0.404671, 1.071108, 1.688889], [0.76584, 1.398258, 0.472728]
2121
]),
2222
))
23+
# Default setting for scaling LR automatically
24+
# - `enable` means enable scaling LR automatically
25+
# or not by default.
26+
# - `base_batch_size` = (8 GPUs) x (16 samples per GPU).
27+
auto_scale_lr = dict(enable=False, base_batch_size=128)

configs/votenet/votenet_8xb8_scannet-3d.py

+5
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@
3232
[0.47535285, 0.49249494, 0.5802117]])))
3333

3434
default_hooks = dict(logger=dict(type='LoggerHook', interval=30))
35+
# Default setting for scaling LR automatically
36+
# - `enable` means enable scaling LR automatically
37+
# or not by default.
38+
# - `base_batch_size` = (8 GPUs) x (8 samples per GPU).
39+
auto_scale_lr = dict(enable=False, base_batch_size=64)

0 commit comments

Comments
 (0)