-
Notifications
You must be signed in to change notification settings - Fork 228
/
dmcp_resnet50_subnet_32xb64.py
48 lines (38 loc) · 1.17 KB
/
dmcp_resnet50_subnet_32xb64.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
_base_ = ['dmcp_resnet50_supernet_32xb64.py']
paramwise_cfg = dict(norm_decay_mult=0.0, bias_decay_mult=0.0)
_base_.optim_wrapper = dict(
optimizer=dict(
type='SGD', lr=0.8, momentum=0.9, weight_decay=0.0001, nesterov=True),
paramwise_cfg=paramwise_cfg)
max_epochs = 100
_base_.param_scheduler = [
# warm up learning rate scheduler
dict(
type='LinearLR',
start_factor=0.25,
by_epoch=True,
begin=0,
end=2,
convert_to_iter_based=True),
# main learning rate scheduler
dict(
type='CosineAnnealingLR',
T_max=max_epochs,
eta_min=1e-5,
by_epoch=True,
begin=2,
end=max_epochs,
convert_to_iter_based=True),
]
_base_.train_cfg = dict(by_epoch=True, max_epochs=max_epochs, val_interval=1)
custom_hooks = None
model = dict(
_scope_='mmrazor',
type='sub_model',
cfg=_base_.supernet,
fix_subnet='configs/pruning/mmcls/dmcp/DMCP_R50_2G.json',
mode='mutator')
default_hooks = _base_.default_hooks
default_hooks['checkpoint'] = dict(type='CheckpointHook', interval=5)
_base_.model_wrapper_cfg = None
randomness = dict(seed=2016, diff_rank_seed=True)