102->201 / NAS->autoDL / more configs of TAS / reorganize docs / fix bugs in NAS baselines

This commit is contained in:
D-X-Y
2020-01-15 00:52:06 +11:00
parent 33384a78af
commit bb2f405961
62 changed files with 789 additions and 412 deletions

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# bash scripts-search/NAS-Bench-201/build.sh
echo script name: $0
echo $# arguments
if [ "$#" -ne 0 ] ;then
echo "Input illegal number of parameters " $#
echo "Need 0 parameters"
exit 1
fi
save_dir=./output/nas_bench_201_package
echo "Prepare to build the package in ${save_dir}"
rm -rf ${save_dir}
mkdir -p ${save_dir}
#cp NAS-Bench-201.md ${save_dir}/README.md
sed '125,187d' NAS-Bench-201.md > ${save_dir}/README.md
cp LICENSE.md ${save_dir}/LICENSE.md
cp -r lib/nas_201_api ${save_dir}/
rm -rf ${save_dir}/nas_201_api/__pycache__
cp exps/NAS-Bench-201/dist-setup.py ${save_dir}/setup.py
cd ${save_dir}
# python setup.py sdist bdist_wheel
# twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# twine upload dist/*

View File

@@ -0,0 +1,16 @@
#!/bin/bash
# bash scripts-search/NAS-Bench-201/meta-gen.sh NAS-BENCH-201 4
echo script name: $0
echo $# arguments
if [ "$#" -ne 2 ] ;then
echo "Input illegal number of parameters " $#
echo "Need 2 parameters for save-dir-name and maximum-node-in-cell"
exit 1
fi
name=$1
node=$2
save_dir=./output/${name}-${node}
python ./exps/NAS-Bench-201/main.py --mode meta --save_dir ${save_dir} --max_node ${node}

View File

@@ -0,0 +1,34 @@
#!/bin/bash
# bash ./scripts-search/NAS-Bench-201/train-a-net.sh resnet 16 5
echo script name: $0
echo $# arguments
if [ "$#" -ne 3 ] ;then
echo "Input illegal number of parameters " $#
echo "Need 3 parameters for network, channel, num-of-cells"
exit 1
fi
if [ "$TORCH_HOME" = "" ]; then
echo "Must set TORCH_HOME envoriment variable for data dir saving"
exit 1
else
echo "TORCH_HOME : $TORCH_HOME"
fi
model=$1
channel=$2
num_cells=$3
save_dir=./output/NAS-BENCH-201-4/
OMP_NUM_THREADS=4 python ./exps/NAS-Bench-201/main.py \
--mode specific-${model} --save_dir ${save_dir} --max_node 4 \
--datasets cifar10 cifar10 cifar100 ImageNet16-120 \
--use_less 0 \
--splits 1 0 0 0 \
--xpaths $TORCH_HOME/cifar.python \
$TORCH_HOME/cifar.python \
$TORCH_HOME/cifar.python \
$TORCH_HOME/cifar.python/ImageNet16 \
--channel ${channel} --num_cells ${num_cells} \
--workers 4 \
--seeds 777 888 999

View File

@@ -0,0 +1,43 @@
#!/bin/bash
# bash ./scripts-search/train-models.sh 0/1 0 100 -1 '777 888 999'
echo script name: $0
echo $# arguments
if [ "$#" -ne 5 ] ;then
echo "Input illegal number of parameters " $#
echo "Need 5 parameters for use-less-or-not, start-and-end, arch-index, and seeds"
exit 1
fi
if [ "$TORCH_HOME" = "" ]; then
echo "Must set TORCH_HOME envoriment variable for data dir saving"
exit 1
else
echo "TORCH_HOME : $TORCH_HOME"
fi
use_less=$1
xstart=$2
xend=$3
arch_index=$4
all_seeds=$5
save_dir=./output/NAS-BENCH-201-4/
if [ ${arch_index} == "-1" ]; then
mode=new
else
mode=cover
fi
OMP_NUM_THREADS=4 python ./exps/NAS-Bench-201/main.py \
--mode ${mode} --save_dir ${save_dir} --max_node 4 \
--use_less ${use_less} \
--datasets cifar10 cifar10 cifar100 ImageNet16-120 \
--splits 1 0 0 0 \
--xpaths $TORCH_HOME/cifar.python \
$TORCH_HOME/cifar.python \
$TORCH_HOME/cifar.python \
$TORCH_HOME/cifar.python/ImageNet16 \
--channel 16 --num_cells 5 \
--workers 4 \
--srange ${xstart} ${xend} --arch_index ${arch_index} \
--seeds ${all_seeds}