From 0b6703175ec05295a1c465a82d6776f1fcf3ad73 Mon Sep 17 00:00:00 2001 From: wandongdong Date: Thu, 28 May 2020 17:53:42 +0800 Subject: [PATCH] add pre_trained config --- mindspore/model_zoo/mobilenetv2/Readme.md | 4 ++-- mindspore/model_zoo/mobilenetv2/scripts/run_train.sh | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mindspore/model_zoo/mobilenetv2/Readme.md b/mindspore/model_zoo/mobilenetv2/Readme.md index 2ee9f0a6ab..5b36a63fe4 100644 --- a/mindspore/model_zoo/mobilenetv2/Readme.md +++ b/mindspore/model_zoo/mobilenetv2/Readme.md @@ -60,14 +60,14 @@ Dataset used: [imagenet](http://www.image-net.org/) ### Usage -- Ascend: sh run_train.sh Ascend [DEVICE_NUM] [SERVER_IP(x.x.x.x)] [VISIABLE_DEVICES(0,1,2,3,4,5,6,7)] [DATASET_PATH] +- Ascend: sh run_train.sh Ascend [DEVICE_NUM] [SERVER_IP(x.x.x.x)] [VISIABLE_DEVICES(0,1,2,3,4,5,6,7)] [DATASET_PATH] [CKPT_PATH] - GPU: sh run_trian.sh GPU [DEVICE_NUM] [VISIABLE_DEVICES(0,1,2,3,4,5,6,7)] [DATASET_PATH] ### Launch ``` # training example - Ascend: sh run_train.sh Ascend 8 192.168.0.1 0,1,2,3,4,5,6,7 ~/imagenet/train/ + Ascend: sh run_train.sh Ascend 8 192.168.0.1 0,1,2,3,4,5,6,7 ~/imagenet/train/ mobilenet_199.ckpt GPU: sh run_train.sh GPU 8 0,1,2,3,4,5,6,7 ~/imagenet/train/ ``` diff --git a/mindspore/model_zoo/mobilenetv2/scripts/run_train.sh b/mindspore/model_zoo/mobilenetv2/scripts/run_train.sh index 95f9b39b93..fc013d474c 100644 --- a/mindspore/model_zoo/mobilenetv2/scripts/run_train.sh +++ b/mindspore/model_zoo/mobilenetv2/scripts/run_train.sh @@ -42,6 +42,7 @@ run_ascend() --server_id=$3 \ --training_script=${BASEPATH}/../train.py \ --dataset_path=$5 \ + --pre_trained=$6 \ --platform=$1 &> ../train.log & # dataset train folder } @@ -76,10 +77,10 @@ run_gpu() &> ../train.log & # dataset train folder } -if [ $# -gt 5 ] || [ $# -lt 4 ] +if [ $# -gt 6 ] || [ $# -lt 4 ] then echo "Usage:\n \ - Ascend: sh run_train.sh Ascend [DEVICE_NUM] [SERVER_IP(x.x.x.x)] [VISIABLE_DEVICES(0,1,2,3,4,5,6,7)] [DATASET_PATH]\n \ + Ascend: sh run_train.sh Ascend [DEVICE_NUM] [SERVER_IP(x.x.x.x)] [VISIABLE_DEVICES(0,1,2,3,4,5,6,7)] [DATASET_PATH] [CKPT_PATH]\n \ GPU: sh run_train.sh GPU [DEVICE_NUM] [VISIABLE_DEVICES(0,1,2,3,4,5,6,7)] [DATASET_PATH]\n \ " exit 1