Giter Site home page Giter Site logo

mit-han-lab / proxylessnas Goto Github PK

View Code? Open in Web Editor NEW
1.4K 70.0 282.0 266.44 MB

[ICLR 2019] ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware

Home Page: https://hanlab.mit.edu/projects/proxylessNAS/

License: MIT License

Python 8.21% Java 22.71% HTML 0.05% Kotlin 0.04% AIDL 0.01% CMake 1.80% C++ 39.97% Makefile 0.04% C 2.47% Objective-C 0.06% Shell 0.02% Cython 0.01% Jupyter Notebook 24.62%
automl specialization hardware-aware acceleration on-device-ai efficient-model

proxylessnas's Introduction

ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware [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},
}

News

  • Next generation of ProxylessNAS: Once-for-All (First place in the 3rd and 4th Low-Power Computer Vision Challenge).
  • First place in the Visual Wake Words Challenge, TF-lite track, @CVPR 2019
  • Third place in the Low Power Image Recognition Challenge (LPIRC), classification track, @CVPR 2019

Performance

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)

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.

We provide a visualization of search process. 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, proxyless_cifar
    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 ImageNet

    python eval.py -d cifar10 # pytorch cifar10

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

File structure

Projects with ProxylessNAS:

Related work on automated model compression and acceleration:

Once for All: Train One Network and Specialize it for Efficient Deployment (ICLR'20, code)

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)

proxylessnas's People

Contributors

dependabot[bot] avatar han-cai avatar lyken17 avatar mzemlyanikin avatar tosemml avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.