Skip to content
[ICLR 2019] ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware.
Python
Branch: master
Clone or download
Latest commit 0191fff Oct 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
logs Delete proxyless_mobile_10_latency.txt May 8, 2019
proxyless_nas release training code Aug 11, 2019
proxyless_nas_tensorflow Update tf_model_zoo.py Jun 12, 2019
search add search code Sep 29, 2019
training Update main.py Aug 11, 2019
.gitignore prepare conf file for pytorch hubs. Oct 17, 2019
LICENSE public release Dec 6, 2018
README.md Update README.md Oct 25, 2019
eval.py reformat with pep8 May 2, 2019
eval_tf.py reformat with pep8 May 2, 2019
hubconf.py updated relative import Oct 17, 2019

README.md

ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware [Website] [arXiv] [Poster]

@inproceedings{
  cai2018proxylessnas,
  title={Proxyless{NAS}: Direct Neural Architecture Search on Target Task and Hardware},
  author={Han Cai and Ligeng Zhu and Song Han},
  booktitle={International Conference on Learning Representations},
  year={2019},
  url={https://arxiv.org/pdf/1812.00332.pdf},
}

Without any proxy, directly and efficiently search neural network architectures on your target task and hardware!

Now, proxylessnas is on PyTorch Hub. You can load it with only two lines!

target_platform = "proxyless_cpu" # proxyless_gpu, proxyless_mobile, proxyless_mobile14 are also avaliable.
model = torch.hub.load('mit-han-lab/ProxylessNAS', target_platform, pretrained=True)

Performance

Mobile settings GPU settings
Model Top-1 Top-5 Latency
MobilenetV2 72.0 91.0 6.1ms
ShufflenetV2(1.5) 72.6 - 7.3ms
ResNet-34 73.3 91.4 8.0ms
MNasNet(our impl) 74.0 91.8 6.1ms
ProxylessNAS (GPU) 75.1 92.5 5.1ms
ProxylessNAS(Mobile) consistently outperforms MobileNetV2 under various latency settings. ProxylessNAS(GPU) is 3.1% better than MobilenetV2 with 20% faster.

Specialization

People used to deploy one model to all platforms, but this is not good. To fully exploit the efficiency, we should specialize architectures for each platform.

Please refer to our paper for more results.

How to use / evaluate

  • Use

    # pytorch 
    from proxyless_nas import proxyless_cpu, proxyless_gpu, proxyless_mobile, proxyless_mobile_14
    net = proxyless_cpu(pretrained=True) # Yes, we provide pre-trained models!
    # tensorflow
    from proxyless_nas_tensorflow import proxyless_cpu, proxyless_gpu, proxyless_mobile, proxyless_mobile_14
    tf_net = proxyless_cpu(pretrained=True)

    If the above scripts failed to download, you download it manually from Google Drive and put them under $HOME/.torch/proxyless_nas/.

  • Evaluate

    python eval.py --path 'Your path to imagent' --arch proxyless_cpu # pytorch

    python eval_tf.py --path 'Your path to imagent' --arch proxyless_cpu # tensorflow

File structure

Related work on automated model compression and acceleration:

ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware (ICLR’19)

AMC: AutoML for Model Compression and Acceleration on Mobile Devices (ECCV’18)

HAQ: Hardware-Aware Automated Quantization (CVPR’19, oral)

Defenstive Quantization: When Efficiency Meets Robustness (ICLR'19)

You can’t perform that action at this time.