Skip to content

Repository files navigation


MIT licensed

Automated Deep Learning (AutoDL-Projects) is an open source, lightweight, but useful project for researchers. This project implemented several neural architecture search (NAS) and hyper-parameter optimization (HPO) algorithms.

Who should consider using AutoDL-Projects

  • Beginners who want to try different AutoDL algorithms
  • Engineers who want to try AutoDL to investigate whether AutoDL works on your projects
  • Researchers who want to easily implement and experiement new AutoDL algorithms.

Why should we use AutoDL-Projects

  • Simple library dependencies
  • All algorithms are in the same codebase
  • Active maintenance

AutoDL-Projects Capabilities

At the moment, this project provides the following algorithms and scripts to run them. Please see the details in the link provided in the description column.

TypeABBRVAlgorithmsDescription
NAS TAS Network Pruning via Transformable Architecture SearchNIPS-2019-TAS.md
DARTS DARTS: Differentiable Architecture SearchICLR-2019-DARTS.md
GDAS Searching for A Robust Neural Architecture in Four GPU HoursCVPR-2019-GDAS.md
SETN One-Shot Neural Architecture Search via Self-Evaluated Template NetworkICCV-2019-SETN.md
NAS-Bench-201 NAS-Bench-201: Extending the Scope of Reproducible Neural Architecture SearchNAS-Bench-201.md
... ENAS / REA / REINFORCE / BOHB NAS-Bench-201.md
HPO HPO-CG Hyperparameter optimization with approximate gradient coming soon
Basic ResNet Deep Learning-based Image Classification BASELINE.md

History of this repo

At first, this repo is GDAS, which is used to reproduce results in Searching for A Robust Neural Architecture in Four GPU Hours. After that, more functions and more NAS algorithms are continuely added in this repo. After it supports more than five algorithms, it is upgraded from GDAS to NAS-Projects. Now, since both HPO and NAS are supported in this repo, it is upgraded from NAS-Projects to AutoDL-Projects.

Requirements and Preparation

Please install Python>=3.6 and PyTorch>=1.3.0. (You could also run this project in lower versions of Python and PyTorch, but may have bugs). Some visualization codes may require opencv.

CIFAR and ImageNet should be downloaded and extracted into $TORCH_HOME. Some methods use knowledge distillation (KD), which require pre-trained models. Please download these models from Google Drive (or train by yourself) and save into .latent-data.

Experiments

Results on CIFAR10

Run on NAS-Projects

ModelError(%)Search cost(GPU days)GenotypesVal_acc of archSearch-seed
DARTS-V13.00±0.140.25Paper--
DARTS-V1-0.26Searched 189.2490627
DARTS-V1-0.26Searched 289.1177047
DARTS-V13.56±0.040.26Searched 389.2790451
DARTS-V1-0.26Searched 489.102189
DARTS-V22.76±0.091Paper--
DARTS-V2-1.32Searched 189.1352665
DARTS-V2-1.33Searched 289.1668513
DARTS-V21.43Searched 389.2033376
DARTS-V2-1.33Searched 489.1774480

The command to search architectures.

CUDA_VISIBLE_DEVICES=0 bash ./scripts-search/DARTS1V-search-NASNet-space.sh cifar10 -1
CUDA_VISIBLE_DEVICES=0 bash ./scripts-search/DARTS2V-search-NASNet-space.sh cifar10 -1

The command to train.

CUDA_VISIBLE_DEVICES=0 bash ./scripts/nas-infer-train.sh cifar10 DARTS_V1 96 -1
CUDA_VISIBLE_DEVICES=0 bash ./scripts/nas-infer-train.sh cifar10 DARTS_V2 96 -1
ModelError(%)Search cost(GPU days)GenotypesVal_acc of archSearch-seed
GDAS2.930.21Paper--
GDAS2.82(Reproduced)-Paper--
GDAS-0.19Searched 178.2611110
GDAS-0.19Searched 278.2321945
GDAS-0.19Searched 378.0339472
GDAS2.89±0.050.19Searched 478.6049342

The command to search architectures.

CUDA_VISIBLE_DEVICES=0 bash ./scripts-search/GDAS-search-NASNet-space.sh cifar10 -1

The command to train.

CUDA_VISIBLE_DEVICES=0 bash ./scripts/nas-infer-train.sh cifar10 GDAS_V1 96 -1
ModelError(%)Search cost(GPU days)GenotypesVal_acc of archSearch-seed
DARTS+2.50±0.110.4Paper--
DARTS+-0.42Searched 184.0667841
DARTS+-0.56Searched 285.4168221
DARTS+2.97±0.070.51Searched 385.7899594
DARTS+-0.49Searched 484.7522713
DARTS+(V1)-0.14Searched 186.0238979
DARTS+(V1)-0.16Searched 285.5657053
DARTS+(V1)3.19±0.000.17Searched 387.2034853
DARTS+(V1)-0.14Searched 485.2821462

The command to search and train are same as DARTS.

ModelError(%)Search cost(GPU days)GenotypesVal_acc of archSearch-seed
DARTS-V13.00±0.140.25Paper--
DARTS-V1-0.38Searched 188.972
DARTS-V1-0.35Searched 289.08444
DARTS-V12.99±0.040.35Searched 389.31666
DARTS-V1-0.34Searched 489.30999
DARTS-V22.76±0.091Paper--
DARTS-V2-0.83Searched 189.232
DARTS-V2-1.04Searched 289.17555
DARTS-V23.02±0.160.79Searched 389.34777
DARTS-V2-0.79Searched 489.02888

The command to search architectures.

python train_search.py # for conv cells on CIFAR-10(DARTS-V1)
python train_search.py --unrolled # for conv cells on CIFAR-10(DARTS-V2)

The command to train.

python train.py --auxiliary --cutout # CIFAR-10
ModelError(%)Search cost(GPU days)GenotypesVal_acc of archSearch-seed
DARTS+2.50±0.110.4Paper--
DARTS+-0.58Searched 185.64233
DARTS+-0.52Searched 285.99694
DARTS+2.97±0.070.73Searched 388.481113
DARTS+-0.54Searched 486.383763
DARTS+(V1)-0.40Searched 185.6438
DARTS+(V1)-0.61Searched 285.992981
DARTS+(V1)2.69±0.060.31Searched 386.398632
DARTS+(V1)-0.23Searched 483.943659

The command to search and train the DARTS+ are same as DARTS.

P.S. The searched architecture in DARTS+(V1) is out of memory when training by the quark0/darts. So I train it by the NAS-Projects code. The command is

CUDA_VISIBLE_DEVICES=0 bash ./scripts/nas-infer-train.sh cifar10 DARTS_V1 96 -1

Run on DenseNAS

ModelError(%)Search cost(GPU days)Search SpaceParams(M)Val_acc of archlatencySearch-seed
DenseNAS13.150.75mbv22.0558.443.662
DenseNAS11.510.73Darts0.521.045.682

Comparison

ModelError(%)Search cost(GPU days)GenotypesParams(M)Train cost()GPU days
DARTS-V13.00±0.140.25Paper3.3-
DARTS-V22.76±0.091Paper3.3-
GDAS2.930.21Paper3.4-
NASP2.83±0.090.1Paper3.3-
NASP(12ops)2.44±0.040.2Paper7.4-
DARTS-V12.99±0.040.35Our Searched (quark0/darts)3.201.71
DARTS-V13.56±0.040.26Our Searched (NAS-Projects)1.731.33
DARTS-V23.02±0.160.79Our Searched (quark0/darts)3.171.46
DARTS-V21.43Our Searched (NAS-Projects)
GDAS2.89±0.050.19Our Searched3.772.25
NASP3.34±0.070.25Our Searched2.401.29
NASP(12ops)2.44±0.040.25Our Searched8.271.5

Citation

If you find that this project helps your research, please consider citing some of the following papers:

@inproceedings{dong2020nasbench201,
title = {NAS-Bench-201: Extending the Scope of Reproducible Neural Architecture Search},
author = {Dong, Xuanyi and Yang, Yi},
booktitle = {International Conference on Learning Representations (ICLR)},
url = {https://openreview.net/forum?id=HJxyZkBKDr},
year = {2020}
}
@inproceedings{dong2019tas,
title = {Network Pruning via Transformable Architecture Search},
author = {Dong, Xuanyi and Yang, Yi},
booktitle = {Neural Information Processing Systems (NeurIPS)},
year = {2019}
}
@inproceedings{dong2019one,
title = {One-Shot Neural Architecture Search via Self-Evaluated Template Network},
author = {Dong, Xuanyi and Yang, Yi},
booktitle = {Proceedings of the IEEE International Conference on Computer Vision (ICCV)},
pages = {3681--3690},
year = {2019}
}
@inproceedings{dong2019search,
title = {Searching for A Robust Neural Architecture in Four GPU Hours},
author = {Dong, Xuanyi and Yang, Yi},
booktitle = {Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
pages = {1761--1770},
year = {2019}
}

Others

If you want to contribute to this repo, please see CONTRIBUTING.md. Besides, please follow CODE-OF-CONDUCT.md.

License

The entire codebase is under MIT license

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages