|
|
@ -17,25 +17,25 @@
|
|
|
|
if [ $# != 3 ] && [ $# != 4 ]
|
|
|
|
if [ $# != 3 ] && [ $# != 4 ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
echo "Usage: sh run_distribute_train_gpu.sh [resnet50|resnet101] [cifar10|imagenet2012] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)"
|
|
|
|
echo "Usage: sh run_distribute_train_gpu.sh [resnet50|resnet101] [cifar10|imagenet2012] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)"
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ $1 != "resnet50" ] && [ $1 != "resnet101" ]
|
|
|
|
if [ $1 != "resnet50" ] && [ $1 != "resnet101" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
echo "error: the selected net is neither resnet50 nor resnet101"
|
|
|
|
echo "error: the selected net is neither resnet50 nor resnet101"
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ $2 != "cifar10" ] && [ $2 != "imagenet2012" ]
|
|
|
|
if [ $2 != "cifar10" ] && [ $2 != "imagenet2012" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
echo "error: the selected dataset is neither cifar10 nor imagenet2012"
|
|
|
|
echo "error: the selected dataset is neither cifar10 nor imagenet2012"
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ $1 == "resnet101" ] && [ $2 == "cifar10" ]
|
|
|
|
if [ $1 == "resnet101" ] && [ $2 == "cifar10" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
echo "error: training resnet101 with cifar10 dataset is unsupported now!"
|
|
|
|
echo "error: training resnet101 with cifar10 dataset is unsupported now!"
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -58,13 +58,13 @@ fi
|
|
|
|
if [ ! -d $PATH2 ]
|
|
|
|
if [ ! -d $PATH2 ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
echo "error: DATASET_PATH=$PATH1 is not a directory"
|
|
|
|
echo "error: DATASET_PATH=$PATH1 is not a directory"
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ $# == 5 ] && [ ! -f $PATH2 ]
|
|
|
|
if [ $# == 5 ] && [ ! -f $PATH2 ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
echo "error: PRETRAINED_CKPT_PATH=$PATH2 is not a file"
|
|
|
|
echo "error: PRETRAINED_CKPT_PATH=$PATH2 is not a file"
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
export DEVICE_NUM=8
|
|
|
|
export DEVICE_NUM=8
|
|
|
@ -99,7 +99,6 @@ then
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
cd ..
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export MS_ROLE=MS_PSERVER
|
|
|
|
export MS_ROLE=MS_PSERVER
|
|
|
|
for((i=0;i<$MS_SERVER_NUM;i++));
|
|
|
|
for((i=0;i<$MS_SERVER_NUM;i++));
|
|
|
|
do
|
|
|
|
do
|
|
|
|