2.4 KiB
2.4 KiB
MeCo: Zero-Cost Proxy for NAS Via Minimum Eigenvalue of Correlation on Feature Maps
Installation
Python >= 3.6
PyTorch >= 2.0.0
nas-bench-201
Preparation
- Download three datasets (CIFAR-10, CIFAR-100, ImageNet16-120) from Google Drive, place them into the directory
./data
- Download the
data
directory and save it to the root folder of this repo. - Download the benchmark files of NAS-Bench-201 from Google Drive , put them into the directory
./data
- Download the NAS-Bench-101 dataset, put it into the directory
./data
- Install
zero-cost-nas
cd zero-cost-nas
pip install .
cd ..
Usage/Examples
Correlation Experiment
cd correlation
python NAS_Bench_101.py
python NAS_Bench_201.py
Experiments on NAS-Bench-201
- Run Zero-Cost-PT with appointed zero-cost proxy:
cd exp_scripts
bash zerocostpt_nb201_pipline.sh --metric [metric] --batch_size [batch_size] --seed [seed]
You can choice metric from ['snip', 'fisher', 'synflow', 'grad_norm', 'grasp', 'jacob_cov','tenas', 'zico', 'meco']
Experiments on DARTS-CNN Space
1. DARTS CNN Space
cd exp_scripts
bash zerocostpt_darts_pipline.sh --metric [metric] --batch_size [batch_size] --seed [seed]
2. DARTS Subspaces S1-S4
cd exp_scripts
bash zerocostpt_darts_pipline.sh --metric [metric] --batch_size [batch_size] --seed [seed] --space [s1-s4]
Reference
Our code is based on Zero-Cost-PT and Zero-Cost-NAS.
Cite
If the code is found useful, we would appreciate it if our paper could be cited with the following Bibtex format
@inproceedings{
jiang2023meco,
title={MeCo: Zero-Shot {NAS} with One Data and Single Forward Pass via Minimum Eigenvalue of Correlation},
author={Tangyu Jiang and Haodi Wang and Rongfang Bie},
booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
year={2023},
url={https://openreview.net/forum?id=KFm2lZiI7n}
}
For any inquiries, bugs, and assistance on building and running the code, please contact me at jty@mail.bnu.edu.cn