forked from mindspore-Ecosystem/mindspore
!5207 fix bug for yolov3-resnet18 scripts
Merge pull request !5207 from chengxb7532/r0.7
This commit is contained in:
commit
54e615e904
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue