Coder Social home page Coder Social logo

scape1989 / proxylessnas Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mit-han-lab/proxylessnas

0.0 1.0 0.0 55 KB

[ICLR 2019] ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware. https://arxiv.org/abs/1812.00332

License: Apache License 2.0

Python 100.00%

proxylessnas's Introduction

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!

Requirements

  • PyTorch 0.3.1 or Tensorflow 1.5
  • Python 3.6+

Updates

  • Dec-21-2018: TensorFlow pretrained models are released.
  • Dec-01-2018: PyTorch pretrained models are released.

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

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)

proxylessnas's People

Contributors

lyken17 avatar han-cai avatar mzemlyanikin avatar

Watchers

James Cloos 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.