提交 8e04ce04 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!5196 fix bug for yolov3-resnet18 scripts

Merge pull request !5196 from chengxb7532/master
......@@ -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<RANK_SIZE;i++))
do
export DEVICE_ID=$i
......
......@@ -115,7 +115,8 @@ def main():
8)
print("Create Mindrecord Done, at {}".format(args_opt.mindrecord_dir))
else:
print("image_dir or anno_path not exits.")
raise ValueError('image_dir {} or anno_path {} does not exist'.format(\
args_opt.image_dir, args_opt.anno_path))
if not args_opt.only_create_dataset:
loss_scale = float(args_opt.loss_scale)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册