xautodl/scripts-cnn/train-cifar.sh

39 lines
964 B
Bash
Raw Normal View History

2019-01-31 15:27:38 +01:00
#!/usr/bin/env sh
2019-03-30 06:38:15 +01:00
# bash scripts-cnn/train-cifar.sh GDAS cifar10 cut
if [ "$#" -ne 3 ] ;then
2019-01-31 15:27:38 +01:00
echo "Input illegal number of parameters " $#
2019-03-30 06:38:15 +01:00
echo "Need 3 parameters for 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
2019-03-30 06:38:15 +01:00
arch=$1
dataset=$2
cutout=$3
SAVED=./output/NAS-CNN/${arch}-${dataset}-${cutout}-E600
2019-01-31 15:27:38 +01:00
2019-03-30 06:38:15 +01:00
PY_C="./env/bin/python"
if [ ! -f ${PY_C} ]; then
echo "Local Run with Python: "`which python`
PY_C="python"
else
echo "Cluster Run with Python: "${PY_C}
fi
${PY_C} --version
${PY_C} ./exps-cnn/train_base.py \
--data_path $TORCH_HOME/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-03-30 06:38:15 +01:00
--print_freq 100 --workers 6