xautodl/scripts-cnn/train-cifar.sh

30 lines
860 B
Bash
Raw Normal View History

2019-01-31 15:27:38 +01:00
#!/usr/bin/env sh
2019-01-31 18:03:35 +01:00
# bash scripts-cnn/train-cifar.sh 0 GDAS cifar10 cut
if [ "$#" -ne 4 ] ;then
2019-01-31 15:27:38 +01:00
echo "Input illegal number of parameters " $#
2019-01-31 18:03:35 +01:00
echo "Need 4 parameters for the GPUs, the architecture, and the dataset-name, and the cutout"
2019-01-31 15:27:38 +01:00
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
gpus=$1
arch=$2
2019-01-31 17:23:55 +01:00
dataset=$3
2019-01-31 18:03:35 +01:00
cutout=$4
SAVED=./snapshots/NAS/${arch}-${dataset}-${cutout}-E600
2019-03-29 17:50:18 +01:00
#--data_path $TORCH_HOME/cifar.python \
2019-01-31 15:27:38 +01:00
2019-01-31 18:03:35 +01:00
CUDA_VISIBLE_DEVICES=${gpus} python ./exps-cnn/train_base.py \
2019-03-29 17:50:18 +01:00
--data_path ./data/data/cifar.python \
2019-01-31 15:27:38 +01:00
--dataset ${dataset} --arch ${arch} \
--save_path ${SAVED} \
--grad_clip 5 \
--init_channels 36 --layers 20 \
2019-01-31 18:03:35 +01:00
--model_config ./configs/nas-cifar-cos-${cutout}.config \
2019-01-31 15:27:38 +01:00
--print_freq 100 --workers 8