Code Monkey home page Code Monkey logo

enas-tfi_clone's Introduction

Efficiency Enhancement of Evolutionary Neural Architecture Search via Training-Free Initialization

MIT licensed

Quan Minh Phan, Ngoc Hoang Luong

Setup

  • Clone this repo:
$ git clone https://github.com/ELO-Lab/ENAS_TFI
$ cd ENAS_TFI
  • Install dependencies:
$ pip install -r requirements.txt
  • Download data in here and put into data folder

Usage

Search

  • For single-objective NAS problems:
python main.py  --n_runs 21 --warm_up 0 --nSamples_for_warm_up 0 --problem_name [problem_name] --algorithm_name GA --seed 0
  • For multi-objective NAS problems:
python main.py  --n_runs 21 --warm_up 0 --nSamples_for_warm_up 0 --problem_name [problem_name] --algorithm_name NSGA-II --seed 0

--problem_name [problem_name] receives one of following values:

problem_name NAS Benchmark Type of problem Dataset Objecitve
SO-NAS101 NAS-Bench-101 single-objective CIFAR-10 validation error
SO-NAS201-1 NAS-Bench-201 single-objective CIFAR-10 validation error
SO-NAS201-2 NAS-Bench-201 single-objective CIFAR-100 validation error
SO-NAS201-3 NAS-Bench-201 single-objective ImageNet16-120 validation error
MO-NAS101 NAS-Bench-101 multi-objective CIFAR-10 #params & validation error
MO-NAS201-1 NAS-Bench-201 multi-objective CIFAR-10 FLOPs & validation error
MO-NAS201-2 NAS-Bench-201 multi-objective CIFAR-100 FLOPs & validation error
MO-NAS201-3 NAS-Bench-201 multi-objective ImageNet16-120 FLOPs & validation error

To search with the Warmup method, set --warm_up 1 and set the number of samples --nSamples_for_warm_up. In our experiments, we set --nSamples_for_warm_up 500.

To experiment with the different population_size or maximum_number_of_evaluations, set another value in main.py (for population_size) and factory.py (for maximum_number_of_evaluations)

Evaluate & Visualize

  • For single-objective NAS problems:
python visualize_so.py  --path_results [path_results]
  • For multi-objective NAS problems:
python visualize_mo.py  --path_results [path_results]

For example: python visualize_mo.py --path_results .\results\MO-NAS101

Note: [path_results] must only contains results of experiments are conducted on the same problem.

Acknowledgement

Our source code is inspired by:

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.