Coder Social home page Coder Social logo

dash's Introduction

Efficient Architecture Search for Diverse Tasks

[[Paper Link (To be added)]]

Original PyTorch implementation of DASH (Diverse-task Architecture SearcH). This repo is built on top of the XD-operations from the paper Rethinking Neural Operations for Diverse Tasks and can be used to replicate experiments on NAS-Bench-360, a suite of ten tasks designed for benchmarking NAS in diverse domains.

DASH is developed for efficiently solving diverse ML problems beyond well-researched domains such as computer vision and natural language processing. Being fast, simple, and broadly applicable, DASH fixes a standard convolutional network (CNN) topology and searches for the right kernel sizes and dilation rates that its operations should take on. It expands the network capacity to extract features at multiple resolutions for different types of data while only requiring searching over the operation space. To speed up the search process, DASH computes the mixture-of-operations needed by weight-sharing using the Fourier diagonalization of convolution, which achieves efficiency improvements over standard baselines both asymptotically and empirically.

Requirements

To run the code, install the dependencies:

conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=10.1 -c pytorch
pip install scipy sklearn tqdm ml-collections h5py requests
git clone https://github.com/mkhodak/relax relax
cd relax && pip install -e .

A Dockerfile is also provided.

Experiments in the paper are done on Google Cloud Platform using a single NVIDIA Tesla V100 with the following image: c2-deeplearning-pytorch-1-10-cu110-v20220227-debian-10.

Experiment with NAS-Bench-360

  1. In ./src/data, run sh download.sh to download required datasets by specifying the task name(s) in the download.sh file.
  2. In the ./src directory, run sh run.sh to reproduce the results of the task name(s) specified in the run.sh file.

The commands for replicating the speed test for DASH in also in ./src/run.sh.

Experiment with Your Own Architectures, Optimizers, and Tasks

Preparation

For new architectures:

Place the corresponding network implementations under the ./src/networks folder and complete the get_model function in ./src/task_configs.py.

For new optimizers:

Add the optimizers to ./src/optimizers.py.

For new tasks:

  1. Add the data loaders to ./src/data_loaders.py and complete the get_data function in ./src/task_configs.py.
  2. Add your customized loss functions and evaluation metrics to ./src/task_utils.py and complete the get_metric function in ./src/task_configs.py.

Then:

Modify the get_config function in ./src/task_configs.py to test the new architectures or the new tasks.

Run DASH

Under the ./src directory, run the following command:

python3 main.py --dataset your_new_task

Citation

If you find this project helpful, please consider citing our paper:

Thanks!

dash's People

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.