Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix bugs in spos,anglenas,detnas #202

Merged
merged 2 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configs/nas/mmcls/spos/metafile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Models:
In Collection: SPOS
Metadata:
FLOPs: 330 MB
Subnet: https://download.openmmlab.com/mmrazor/v0.1/nas/spos/spos_shufflenetv2_subnet_8xb128_in1k/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20211222-454627be_mutable_cfg.yaml
Subnet: https://download.openmmlab.com/mmrazor/v1/spos/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20220715-aa94d5ef_subnet_cfg_v1.yaml
Results:
- Task: Image Classification
Dataset: ImageNet-1k
Metrics:
Top 1 Accuracy: 73.87
Top 5 Accuracy: 91.60
Config: configs/nas/mmcls/spos/spos_shufflenet_subnet_8xb128_in1k.py
Weights: https://download.openmmlab.com/mmrazor/v0.1/nas/spos/spos_shufflenetv2_subnet_8xb128_in1k/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20211222-1f0a0b4d.pth
Weights: https://download.openmmlab.com/mmrazor/v1/spos/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20211222-1f0a0b4d_v1.pth
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_base_ = ['./spos_supernet_mobilenet_proxyless_gpu_8xb128_in1k_2.0.py']
_base_ = ['./spos_mobilenet_supernet_8xb128_in1k.py']

# FIXME: you may replace this with the mutable_cfg searched by yourself
fix_subnet = 'configs/nas/spos/AngleNAS_SHUFFLENETV2_IN1k_2.0.yaml' # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
head=dict(
type='LinearClsHead',
num_classes=1000,
in_channels=1024,
in_channels=1728,
loss=dict(
type='LabelSmoothLoss',
num_classes=1000,
Expand Down
5 changes: 2 additions & 3 deletions configs/nas/mmcls/spos/spos_shufflenet_subnet_8xb128_in1k.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
_base_ = ['./spos_supernet_shufflenetv2_8xb128_in1k_2.0_example.py']
_base_ = ['./spos_shufflenet_supernet_8xb128_in1k.py']

# FIXME: you may replace this with the mutable_cfg searched by yourself
# fix_subnet = 'configs/nas/spos/SPOS_SHUFFLENETV2_330M_IN1k_PAPER_2.0.yaml' # noqa: E501
fix_subnet = 'configs/nas/detnas/DetNAS_SPOS_SHUFFLENETV2_330M_IN1k_PAPER_2.0.yaml' # noqa: E501
fix_subnet = 'https://download.openmmlab.com/mmrazor/v1/spos/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20220715-aa94d5ef_subnet_cfg_v1.yaml' # noqa: E501

model = dict(fix_subnet=fix_subnet)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# model
supernet = dict(
type='ImageClassifier',
# data_preprocessor=_base_.preprocess_cfg,
data_preprocessor=_base_.preprocess_cfg,
backbone=_base_.nas_backbone,
neck=dict(type='GlobalAveragePooling'),
head=dict(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_base_ = ['./spos_supernet_frcnn_shufflenet_coco_1x.py']
_base_ = ['./detnas_frcnn_shufflenet_supernet_coco_1x.py']

# FIXME: you may replace this with the mutable_cfg searched by yourself
# fix_subnet = 'configs/nas/spos/SPOS_SHUFFLENETV2_330M_IN1k_PAPER_2.0.yaml' # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
supernet.neck.in_channels = [64, 160, 320, 640]

supernet.roi_head.bbox_head.norm_cfg = norm_cfg
supernet.roi_head.bbox_head.type = 'Shared4Conv1FCBBoxHead'

model = dict(
_delete_=True,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
_base_ = './detnas_shufflenet_supernet_8xb128_in1k.py'

# FIXME: you may replace this with the mutable_cfg searched by yourself
# fix_subnet = 'configs/nas/spos/SPOS_SHUFFLENETV2_330M_IN1k_PAPER_2.0.yaml' # noqa: E501
fix_subnet = 'configs/nas/detnas/DetNAS_SPOS_SHUFFLENETV2_330M_IN1k_PAPER_2.0.yaml' # noqa: E501
fix_subnet = 'https://download.openmmlab.com/mmrazor/v1/detnas/detnas_subnet_frcnn_shufflenetv2_fpn_1x_coco_bbox_backbone_flops-0.34M_mAP-37.5_20220715-61d2e900_subnet_cfg_v1.yaml' # noqa: E501

model = dict(fix_subnet=fix_subnet)

Expand Down
4 changes: 2 additions & 2 deletions configs/nas/mmdet/detnas/metafile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Models:
FLOPs(Backbone): 340 MB
Params(Backbone): 3.35 MB
Supernet: FRCNN-ShuffleNetV2
Mutable: https://download.openmmlab.com/mmrazor/v0.1/nas/spos/spos_shufflenetv2_subnet_8xb128_in1k/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20211222-454627be_mutable_cfg.yaml
Mutable: https://download.openmmlab.com/mmrazor/v1/detnas/detnas_subnet_frcnn_shufflenetv2_fpn_1x_coco_bbox_backbone_flops-0.34M_mAP-37.5_20220715-61d2e900_subnet_cfg_v1.yaml
Results:
- Task: Object Detection
Dataset: COCO
Metrics:
box AP: 37.5
Config: configs/nas/mmdet/detnas/detnas_frcnn_shufflenet_subnet_coco_1x.py
Weights: https://download.openmmlab.com/mmrazor/v0.1/nas/detnas/detnas_subnet_frcnn_shufflenetv2_fpn_1x_coco/detnas_subnet_frcnn_shufflenetv2_fpn_1x_coco_bbox_backbone_flops-0.34M_mAP-37.5_20211222-67fea61f_mutable_cfg.yaml
Weights: https://download.openmmlab.com/mmrazor/v1/detnas/detnas_subnet_frcnn_shufflenetv2_fpn_1x_coco_bbox_backbone_flops-0.34M_mAP-37.5_20220715-61d2e900_v1.pth