add imagenet support for google in shell script.

pull/6606/head
cj 5 years ago
parent 6c26629404
commit 319a410351

@ -20,4 +20,15 @@ BASEPATH=$(cd "`dirname $0`" || exit; pwd)
export PYTHONPATH=${BASEPATH}:$PYTHONPATH
export DEVICE_ID=0
python ${BASEPATH}/../eval.py > ./eval.log 2>&1 &
dataset_type='cifar10'
if [ $# == 1 ]
then
if [ $1 != "cifar10" ] && [ $1 != "imagenet" ]
then
echo "error: the selected dataset is neither cifar10 nor imagenet"
exit 1
fi
dataset_type=$1
fi
python ${BASEPATH}/../eval.py --dataset_name=$dataset_type > ./eval.log 2>&1 &

@ -16,9 +16,9 @@
ulimit -u unlimited
if [ $# != 1 ]
if [ $# != 1 ] && [ $# != 2 ]
then
echo "GPU: sh run_eval_gpu.sh [CHECKPOINT_PATH]"
echo "GPU: sh run_eval_gpu.sh [CHECKPOINT_PATH] [cifar10|imagenet]"
exit 1
fi
@ -29,6 +29,17 @@ then
exit 1
fi
dataset_type='cifar10'
if [ $# == 2 ]
then
if [ $2 != "cifar10" ] && [ $2 != "imagenet" ]
then
echo "error: the selected dataset is neither cifar10 nor imagenet"
exit 1
fi
dataset_type=$2
fi
BASEPATH=$(cd "`dirname $0`" || exit; pwd)
export PYTHONPATH=${BASEPATH}:$PYTHONPATH
export DEVICE_ID=0
@ -40,4 +51,4 @@ fi
mkdir ../eval
cd ../eval || exit
python3 ${BASEPATH}/../eval.py --checkpoint_path=$1 > ./eval.log 2>&1 &
python3 ${BASEPATH}/../eval.py --checkpoint_path=$1 --dataset_name=$dataset_type > ./eval.log 2>&1 &

@ -17,7 +17,7 @@
if [ $# -lt 3 ]
then
echo "Usage: \
sh run_train.sh [DEVICE_NUM] [VISIABLE_DEVICES(0,1,2,3,4,5,6,7)] [cifar10|imagenet]\
sh run_train_gpu.sh [DEVICE_NUM] [VISIABLE_DEVICES(0,1,2,3,4,5,6,7)] [cifar10|imagenet]\
"
exit 1
fi

Loading…
Cancel
Save