Giter Club home page Giter Club logo

unas's Introduction

UNAS: Differentiable Architecture Search Meets Reinforcement Learning, CVPR 2020 Oral (Paper)

Arash Vahdat·Arun Mallya·Ming‑Yu Liu·Jan Kautz

Introduction

This repository provides the official PyTorch implementation of UNAS that was presented at CVPR 2020. The paper presents results in two search spaces including DARTS and ProxylessNAS spaces. Our paper can be found here.

Watch a short video that describes UNAS:

Requirements

UNAS is examined using Python 3.5. To install the requirements, follow these steps:

  1. Run
$ pip install -r requirements.txt
  1. Install apex using:
$ git clone https://github.com/NVIDIA/apex
$ cd apex
$ pip install -v --no-cache-dir ./

Preparing Data

We examined UNAS on the CIFAR-10, CIFAR-100, and ImageNet datasets. The CIFAR datasets will be downloaded automatically if you don't have a local copy. However, you may need to download the ImageNet 2012 dataset and structure the dataset under train and val subfloders. You can follow this page to structure the dataset. The data directory should be in the form:

data/
    ├── train/
        ├── n01440764/
        ├── n01443537/
        ├── ...
    ├── val/
        ├── n01440764/
        ├── n01443537/
        ├── ...        

Running Search and Evaluation from Scratch

In UNAS, in the search phase, we first search for either normal/reduction cells (in DARTS space) or the whole network architecture (in ProxylessNAS space). Then in the evaluation phase, in order to measure the performance of search, we train the discovered cells or network architectures from scratch. The commands for performing both search and evaluation are provided in commands.sh. Note that we use 4 GPUs for search on CIFAR-10 and CIFAR-100, 1 GPU for evaluation on these datasets, and 8 GPUs for search and eval on ImageNet.

Running with Cells/Networks Discovered by UNAS

In order to run the evaluation code with the cells discovered in our experiments, you can set --genotype to UNAS_CIFAR10, UNAS_CIFAR100, or UNAS_IMAGENET when evaluating in DARTS space. Similarly, you can set --genotype to UNAS when evaluating in ProxylessNAS space (check the example command in commands.sh.

Monitoring search/eval progress

You can monitor search and evaluation progress using tensorboar. You can launch tensorboard using these commands:

$ export EXPR_ID=UNIQUE_EXPR_ID
$ export CHECKPOINT_DIR=PATH_TO_CHECKPOINT_DIR
$ tensorboard --logdir $CHECKPOINT_DIR/search-$EXPR_ID/       # During search
$ tensorboard --logdir $CHECKPOINT_DIR/eval-$EXPR_ID/         # During evaluation

License

Please check the LICENSE file.

Bibtex:

@inproceedings{vahdat2019UNAS,
  title={{UNAS}: Differentiable Architecture Search Meets Reinforcement Learning},
  author={Vahdat, Arash and Mallya, Arun and Liu, Ming-Yu and  Kautz, Jan},
  booktitle = {Computer Vision and Pattern Recognition (CVPR)},
  year={2020}
}

unas's People

Contributors

arash-vahdat 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.