Giter VIP home page Giter VIP logo

s3nas's Introduction

S3NAS: Fast NPU-aware Neural Architecture Search

We conduct NAS Following three steps : Supernet design, Single-Path NAS with modification, Scaling and post-processing.

Results

We depict our search results on MIDAP below. Height of each block in the picture is proportional to expansion ratio. SE-applied blocks are depicted as dotted blocks.

Requirements

Usage

  1. Set up ImageNet dataset

    To setup the ImageNet follow the instructions from here

    Or you can just copy from other bucket using gsutil -m cp -r, or transfer from other bucket.

  2. Set up the profiled latency files

    latency_folder
    |-- Conv2D
    |-- Dense
    |-- GlobalAvgPool
    |-- MBConvBlock
    |-- MixConvBlock
        |-- r1_k3,5_s22_e2,4_i32_o32_c100_noskip_relu_imgsize112
        |-- ...
    

    each latency file contains a dictionary with latency value. For example, the content of r1_k3,5_s22_e2,4_i32_o32_c100_noskip_relu_imgsize112 may be {"latency": 364425}

    For blocks, imgsize indicate width/height of input image of the block. Activation function is set to be relu as default. For more information, refer latency_estimator.py and blockargs.py.

    For other components, the file name rule is similar, you can refer to get_str ftns of each BasicOps. refer block_ops.py

    to use our profiled latency files for MIDAP, please type

    git submodule update --init --recursive
    
  3. Set up flags and run

    Refer to the script files in base_experiment_scripts, or set up flags yourself. When you use scripts in base_experiment_scripts, please MODIFY

    • Google Cloud Storage Bucket
    • Model file name
    • Google Cloud TPU name
    • Target latency
    • Latency folder name --constraint_lut_folder=XXX

    We provide script templates for NAS / train / post_process

  4. Run the script file.

Note

  • When running on Multi-GPU, set --moving_average_decay=0.0

    Multi-GPU in TF 1.x does not support tf.train.ExponentialMovingAverage. refer

  • When running on GPU, set --use_tpu=False --transpose_input=False

  • Setting --use_cache=False can reduce memory usage.

  • We didn't check the validity on GPU environment.

Citation

If it helps your research, please cite

@misc{lee2020s3nas,
    title={S3NAS: Fast NPU-aware Neural Architecture Search Methodology},
    author={Jaeseong Lee and Duseok Kang and Soonhoi Ha},
    year={2020},
    eprint={2009.02009},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

s3nas's People

Contributors

thnkinbtfly avatar jsrimr 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.