Implementation for the paper "Efficient Channel Pruning Based on Probability Model Bypassing and Architecture Alignment"
Overview
├── checkpoints (Pretrained super-net checkpoints)
│ └── stage1
│ ├── mbv2-stage1.pth
│ ├── res18-stage1.pth
│ └── res50-stage1.pth
├── config (Configuration snippets)
│ └── imagenet
│ ├── mbv2
│ │ └── 8gpu
│ │ └── 2xfloss.yaml
│ └── res50
│ └── 8gpu
│ └── 2xfloss.yaml
├── eval (Evaluation root path)
│ ├── models
│ │ ├── adaptive_mobilenet.py
│ │ ├── adaptive_resnet.py
│ │ ├── amc_mbv2.py
│ │ ├── inceptionresnetv2.py
│ ├── retrain_no_sync.py
│ └── retrain_res50.py
├── models
│ ├── adaptive (Configurable model for evaluation)
│ │ ├── __init__.py
│ │ ├── mobilenet.py
│ │ └── resnet.py
│ ├── ecp (Super-net model for ECP)
│ │ ├── alpha_op.py
│ │ ├── ecp_mobilenet.py
│ │ ├── ecp_resnet.py
│ │ ├── __init__.py
│ │ └── utils.py
│ ├── __init__.py
│ └── slimmable
│ ├── __init__.py
│ ├── us_mobilenet.py
│ ├── us_ops.py
│ └── us_resnet.py
├── runner (APIs for executing training and search for different methods)
│ ├── ecp_runner.py
│ ├── __init__.py
│ ├── normal_runner.py
│ └── us_runner.py
└── utils (Utility functions)
├── data.py
├── distributed.py
├── __init__.py
├── loss_fn.py
├── lr_scheduler.py
├── meter.py
└── tools.py
├── search-example.sh (Execution script for search)
├── eval-example.sh (Execution script for evaluation)
├── main.py (Universal entry point)
├── requirements.txt (dependencies)
HOWTO
Search on Different Architecture
bash search-example.sh
Evaluate the Model Configuration Found by Search
bash eval-example.sh
Bibliography
If you find the code in this repository useful in your research, please consider citing our paper.
@inproceedings{ECP,
address = {USA},
title = {Efficient {Channel} {Pruning} {Based} on {Architecture} {Alignment} and {Probability} {Model} {Bypassing}},
doi = {10.1109/SMC52423.2021.9659289},
language = {en},
booktitle = {Proceedings of the {IEEE} {International} {Conference} on {Systems}, {Man}, and {Cybernetics}},
publisher = {IEEE},
author = {Tao, Lvfang and Gao, Wei},
year = {2021},
pages = {3232--3237},
}
Acknowledgement
This implementation was based on the following works: