Skip to content

Commit

Permalink
fix configs
Browse files Browse the repository at this point in the history
  • Loading branch information
HIT-cwh committed Apr 26, 2022
1 parent 7de8a07 commit 8f661b6
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@
nms=dict(type='nms', iou_threshold=0.6),
max_per_img=100))

checkpoint = 'https://download.openmmlab.com/mmdetection/v2.0/gfl/gfl_r101_fpn_mstrain_2x_coco/gfl_r101_fpn_mstrain_2x_coco_20200629_200126-dd12f847.pth' # noqa: E501

teacher = dict(
type='mmdet.GFL',
init_cfg=dict(type='Pretrained', checkpoint=checkpoint),
backbone=dict(
type='ResNet',
depth=101,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@
train_cfg=dict(),
test_cfg=dict(mode='whole'))

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_512x1024_80k_cityscapes/pspnet_r101-d8_512x1024_80k_cityscapes_20200606_112211-e1e1100f.pth' # noqa: E501

# pspnet r101
teacher = dict(
type='mmseg.EncoderDecoder',
init_cfg=dict(type='Pretrained', checkpoint=checkpoint),
backbone=dict(
type='ResNetV1c',
depth=101,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@
topk=(1, 5),
))

checkpoint = 'https://download.openmmlab.com/mmclassification/v0/resnet/resnet50_8xb32_in1k_20210831-ea4938fc.pth' # noqa: E501

# teacher settings
teacher = dict(
type='mmcls.ImageClassifier',
init_cfg=dict(type='Pretrained', checkpoint=checkpoint),
backbone=dict(
type='ResNet',
depth=34,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
cal_acc=True),
)

# FIXME: you may replace this with the mutable_cfg searched by yourself
mutable_cfg = 'https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v0.1/nas/darts/darts_subnetnet_1xb96_cifar10/darts_subnetnet_1xb96_cifar10_acc-97.32_20211222-e5727921_mutable_cfg.yaml' # noqa: E501

algorithm = dict(
type='Darts',
architecture=dict(type='MMClsArchitecture', model=model),
Expand Down Expand Up @@ -69,7 +72,8 @@
)),
),
retraining=True,
unroll=False)
unroll=False,
mutable_cfg=mutable_cfg)

data = dict(workers_per_gpu=8)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
_base_ = ['./detnas_supernet_frcnn_shufflenetv2_fpn_1x_coco.py']

algorithm = dict(retraining=True)
# FIXME: you may replace this with the mutable_cfg searched by yourself
mutable_cfg = 'configs/nas/detnas/DETNAS_FRCNN_SHUFFLENETV2_340M_COCO_MMRAZOR.yaml' # noqa: E501

algorithm = dict(retraining=True, mutable_cfg=mutable_cfg)
4 changes: 4 additions & 0 deletions configs/nas/detnas/detnas_subnet_shufflenetv2_8xb128_in1k.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
_base_ = [
'../spos/spos_subnet_shufflenetv2_8xb128_in1k.py',
]

# FIXME: you may replace this with the mutable_cfg searched by yourself
mutable_cfg = 'configs/nas/detnas/DETNAS_FRCNN_SHUFFLENETV2_340M_COCO_MMRAZOR.yaml' # noqa: E501
algorithm = dict(mutable_cfg=mutable_cfg)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
'./spos_supernet_mobilenet_proxyless_gpu_8xb128_in1k.py',
]

algorithm = dict(retraining=True)
# FIXME: you may replace this with the mutable_cfg searched by yourself
mutable_cfg = 'configs/nas/spos/SPOS_MOBILENET_490M_FROM_ANGELNAS.yaml'

algorithm = dict(retraining=True, mutable_cfg=mutable_cfg)
evaluation = dict(interval=10000, metric='accuracy')
checkpoint_config = dict(interval=30000)

Expand Down
5 changes: 4 additions & 1 deletion configs/nas/spos/spos_subnet_shufflenetv2_8xb128_in1k.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
'./spos_supernet_shufflenetv2_8xb128_in1k.py',
]

algorithm = dict(retraining=True)
# FIXME: you may replace this with the mutable_cfg searched by yourself
mutable_cfg = 'configs/nas/spos/SPOS_SHUFFLENETV2_330M_IN1k_PAPER.yaml'

algorithm = dict(retraining=True, mutable_cfg=mutable_cfg)

runner = dict(max_iters=300000)
find_unused_parameters = False
9 changes: 8 additions & 1 deletion configs/pruning/autoslim/autoslim_mbv2_subnet_8xb256_in1k.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@
label_smooth_val=0.1,
loss_weight=1.0)))

# FIXME: you may replace this with the channel_cfg searched by yourself
channel_cfg = [
'configs/pruning/autoslim/AUTOSLIM_MBV2_530M_OFFICIAL.yaml',
'configs/pruning/autoslim/AUTOSLIM_MBV2_320M_OFFICIAL.yaml',
'configs/pruning/autoslim/AUTOSLIM_MBV2_220M_OFFICIAL.yaml'
]

algorithm = dict(
architecture=dict(type='MMClsArchitecture', model=model),
distiller=None,
retraining=True,
bn_training_mode=False,
)
channel_cfg=channel_cfg)

runner = dict(type='EpochBasedRunner', max_epochs=300)

Expand Down

0 comments on commit 8f661b6

Please sign in to comment.