From 07662e1ae9638893b31c4e2ae3e4b097011b950d Mon Sep 17 00:00:00 2001 From: chengxianbin Date: Tue, 25 Aug 2020 15:59:43 +0800 Subject: [PATCH] clear the warning of execute run_distribute_train.sh --- .../cv/yolov3_resnet18/scripts/run_distribute_train.sh | 10 +++++++--- model_zoo/official/cv/yolov3_resnet18/train.py | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/model_zoo/official/cv/yolov3_resnet18/scripts/run_distribute_train.sh b/model_zoo/official/cv/yolov3_resnet18/scripts/run_distribute_train.sh index 457598c9d..10643e7a6 100644 --- a/model_zoo/official/cv/yolov3_resnet18/scripts/run_distribute_train.sh +++ b/model_zoo/official/cv/yolov3_resnet18/scripts/run_distribute_train.sh @@ -36,18 +36,22 @@ ANNO_PATH=$5 PRE_TRAINED=$7 PRE_TRAINED_EPOCH_SIZE=$8 +BASE_PATH=$(cd "`dirname $0`" || exit; pwd) +cd $BASE_PATH/../ || exit + # Before start distribute train, first create mindrecord files. python train.py --only_create_dataset=1 --mindrecord_dir=$MINDRECORD_DIR --image_dir=$IMAGE_DIR \ --anno_path=$ANNO_PATH +if [ $? -ne 0 ] +then + exit 1 +fi echo "After running the scipt, the network runs in the background. The log will be generated in LOGx/log.txt" export RANK_TABLE_FILE=$6 export RANK_SIZE=$1 -BASE_PATH=$(cd "`dirname $0`" || exit; pwd) -cd $BASE_PATH/../ || exit - for((i=0;i