Giter Club home page Giter Club logo

dso-nas's Introduction

DSO-NAS

Codes for papers "You Only Search Once: Single Shot Neural Architecture Search via Direct Sparse Optimization"

You Only Search Once: Single Shot Neural Architecture Search via Direct Sparse Optimization
Xinbang zhang, Zehao Huang, Naiyan Wang.

Requirements

python == 2.7 
mxnet == 1.2.1

Cifar Experiments:

Please follow the instructions in https://mxnet.incubator.apache.org/ to make .rec file with the .lst file in /data/cifar, split training data into two part (train1.rec & train2.rec) and put them in /data/cifar_search.

Step1: go to config/cfgs, set dataset='cifar10_search', train_baseline=True, retrain_model=False, model_search=False and run

python train.py

Step2: go to config/cfgs, set dataset='cifar10_search', train_baseline=False,retrain_model=False,model_search=True. To apply share search space, set share_search_space to True. To apply Adaptive Flops or Adaptive MAC technique, please set ad_flops or ad_mac to True. Run

python train_search.py

Loading the pretrain model obtained by step1 is recommonded.

Step3: go to config/cfgs, set dataset='cifar10', train_baseline=False,retrain_model=True,model_search=False, and load the model obtained by step 2 and run

python train.py
name Test error Parameter
DSO-NAS-share+cutout 2.74 3.0M
DSO-NAS-full+cutout 2.83 3.0M

ImageNet Experiments:

Please follow the instructions in https://mxnet.incubator.apache.org/ to make .rec file with the .lst file in /data/imagenet and /data/imagenet_search

Step1: go to config/cfgs, set dataset='imagenet_search', train_baseline=True,retrain_model=False,model_search=False and run

python train.py

Step2: go to config/cfgs, set dataset='imagenet_search', train_baseline=False,retrain_model=False,model_search=True. To apply share search space, set share_search_space to True. To apply Adaptive Flops or Adaptive Latency technique, please set ad_flops ad_latency to True. Run

python train_search.py

Loading the pretrain model obtained by step1 is recommonded.

Step3: go to config/cfgs, set dataset='imagenet_search', train_baseline=False,retrain_model=True,model_search=False, and load the model obtained by step 2 and run

python train.py
name Test error (Top 1 / Top 5) Parameter Flops
DSO-NAS-share 25.4 / 8.3 3.0M 567M
DSO-NAS-full 25.7 / 8.1 3.0M 608M

Bibtex

@article{zhang2018you,
  title={You only search once: Single shot neural architecture search via direct sparse optimization},
  author={Zhang, Xinbang and Huang, Zehao and Wang, Naiyan},
  journal={arXiv preprint arXiv:1811.01567},
  year={2018}
}

dso-nas's People

Contributors

xinbangzhang 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.