Slimmable Neural Networks, ICLR 2019
Clone or download
Latest commit 74fc3ff Jan 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
apps Release (#3) Dec 26, 2018
models Release (#3) Dec 26, 2018
utils Release (#3) Dec 26, 2018
.gitignore Release (#3) Dec 26, 2018
LICENSE Add LICENSE Dec 26, 2018
README.md Update README.md Jan 10, 2019
train.py Release (#3) Dec 26, 2018

README.md

Slimmable Neural Networks

ICLR 2019 Paper | ArXiv | OpenReview | Detection | Model Zoo | BibTex

Illustration of slimmable neural networks. The same model can run at different widths (number of active channels), permitting instant and adaptive accuracy-efficiency trade-offs.

Run

  1. Requirements:
    • python3, pytorch 1.0, torchvision 0.2.1, pyyaml 3.13.
    • Prepare ImageNet-1k data following pytorch example.
  2. Training and Testing:
    • The codebase is a general ImageNet training framework using yaml config under apps dir, based on PyTorch.
    • To test, download pretrained models to logs dir and directly run command.
    • To train, comment test_only and pretrained in config file. You will need to manage visible gpus by yourself.
    • Command: python train.py app:{apps/***.yml}. {apps/***.yml} is config file. Do not miss app: prefix.
    • Training and testing of MSCOCO benchmarks are released under branch detection.
  3. Still have questions?
    • If you still have questions, please search closed issues first. If the problem is not solved, please open a new.

Model Zoo

Model Switches (Widths) Top-1 Err. MFLOPs Model ID
S-MobileNet v1 1.00
0.75
0.50
0.25
28.5
30.5
35.2
46.9
569
325
150
41
a6285db
S-MobileNet v2 1.00
0.75
0.50
0.35
29.5
31.1
35.6
40.3
301
209
97
59
0593ffd
S-ShuffleNet 2.00
1.00
0.50
28.6
34.5
42.8
524
138
38
1427f66
S-ResNet-50 1.00
0.75
0.50
0.25
24.0
25.1
27.9
35.0
4.1G
2.3G
1.1G
278
3fca9cc

Technical Details

Implementing slimmable networks and slimmable training is straightforward:

License

CC 4.0 Attribution-NonCommercial International

The software is for educaitonal and academic research purpose only.

Citing

@article{yu2018slimmable,
  title={Slimmable Neural Networks},
  author={Yu, Jiahui and Yang, Linjie and Xu, Ning and Yang, Jianchao and Huang, Thomas S},
  journal={arXiv preprint arXiv:1812.08928},
  year={2018}
}