forked from mindspore-Ecosystem/mindspore
!11814 fix issue I2NU25 and issue I2W9WY, fix script error and word spell mistakes
From: @zhouneng2 Reviewed-by: @linqingke,@oacjiewen Signed-off-by: @linqingke
This commit is contained in:
commit
8a61767f32
|
@ -34,10 +34,10 @@ get_real_path(){
|
|||
}
|
||||
|
||||
current_exec_path=$(pwd)
|
||||
echo ${current_exec_path}
|
||||
echo "current_exec_path: " ${current_exec_path}
|
||||
|
||||
dirname_path=$(dirname "$(pwd)")
|
||||
echo ${dirname_path}
|
||||
echo "dirname_path: " ${dirname_path}
|
||||
|
||||
SCRIPT_NAME='train.py'
|
||||
|
||||
|
@ -57,49 +57,63 @@ fi
|
|||
|
||||
if [ $# == 2 ]
|
||||
then
|
||||
use_device_id=$1
|
||||
pretrained_backbone=$(get_real_path $2)
|
||||
if [ ! -f $pretrained_backbone ]
|
||||
then
|
||||
echo "error: pretrained_backbone=$pretrained_backbone is not a file"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $# == 3 ]
|
||||
then
|
||||
use_device_id=$1
|
||||
pretrained_backbone=$(get_real_path $2)
|
||||
dataset_path=$(get_real_path $3)
|
||||
if [ ! -f $dataset_path ]
|
||||
then
|
||||
echo "error: dataset_path=$dataset_path is not a file"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $# == 4 ]
|
||||
then
|
||||
use_device_id=$1
|
||||
pretrained_backbone=$(get_real_path $2)
|
||||
dataset_path=$(get_real_path $3)
|
||||
annot_path=$(get_real_path $4)
|
||||
if [ ! -f $annot_path ]
|
||||
then
|
||||
echo "error: annot_path=$annot_path is not a file"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $# == 5 ]
|
||||
then
|
||||
use_device_id=$1
|
||||
pretrained_backbone=$(get_real_path $2)
|
||||
dataset_path=$(get_real_path $3)
|
||||
annot_path=$(get_real_path $4)
|
||||
img_dir=$(get_real_path $5)
|
||||
if [ ! -f $img_dir ]
|
||||
then
|
||||
echo "error: img_dir=$img_dir is not a file"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $use_device_id
|
||||
echo $pretrained_backbone
|
||||
echo $dataset_path
|
||||
echo $annot_path
|
||||
echo $img_dir
|
||||
echo "use_device_id: " $use_device_id
|
||||
echo "pretrained_backbone: " $pretrained_backbone
|
||||
echo "dataset_path: " $dataset_path
|
||||
echo "annot_path: " $annot_path
|
||||
echo "img_dir: " $img_dir
|
||||
|
||||
if [ ! -f $pretrained_backbone ]
|
||||
then
|
||||
echo "error: pretrained_backbone=$pretrained_backbone is not a file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $dataset_path ]
|
||||
then
|
||||
echo "error: dataset_path=$dataset_path is not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f $annot_path ]
|
||||
then
|
||||
echo "error: annot_path=$annot_path is not a file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $img_dir ]
|
||||
then
|
||||
echo "error: img_dir=$img_dir is not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PYTHONPATH=${dirname_path}:$PYTHONPATH
|
||||
export RANK_SIZE=1
|
||||
|
|
|
@ -216,7 +216,7 @@ Results and checkpoints are written to `./train_parallel_{i}` folder for device
|
|||
|
||||
### Training Result
|
||||
|
||||
Training result will be stored in the example path, whose folder name begins with "train" or "train_parallel". You can find checkpoint file together with result like the followings in loss.log.
|
||||
Training result will be stored in the example path, whose folder name begins with "train" or "train_parallel". You can find checkpoint file together with result like the following in loss.log.
|
||||
|
||||
```text
|
||||
# distribute training result(8p)
|
||||
|
|
|
@ -48,7 +48,7 @@ cp ./*.py ./eval
|
|||
cp ./scripts/*.sh ./eval
|
||||
cp -r ./src ./eval
|
||||
cd ./eval || exit
|
||||
echo "start infering for device $DEVICE_ID"
|
||||
echo "start inferring for device $DEVICE_ID"
|
||||
env > env.log
|
||||
python eval.py --device_id=$DEVICE_ID --ckpt_path=$PATH1 &> log &
|
||||
cd .. || exit
|
||||
|
|
Loading…
Reference in New Issue