Browse Source

!1603 add pre_trained check point config in run_train.sh

Merge pull request !1603 from wandongdong/master
tags/v0.5.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
dc0c6f1f53
2 changed files with 5 additions and 4 deletions
  1. +2
    -2
      mindspore/model_zoo/mobilenetv2/Readme.md
  2. +3
    -2
      mindspore/model_zoo/mobilenetv2/scripts/run_train.sh

+ 2
- 2
mindspore/model_zoo/mobilenetv2/Readme.md View File

@@ -60,14 +60,14 @@ Dataset used: [imagenet](http://www.image-net.org/)


### Usage ### 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] - GPU: sh run_trian.sh GPU [DEVICE_NUM] [VISIABLE_DEVICES(0,1,2,3,4,5,6,7)] [DATASET_PATH]


### Launch ### Launch


``` ```
# training example # 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/ GPU: sh run_train.sh GPU 8 0,1,2,3,4,5,6,7 ~/imagenet/train/
``` ```




+ 3
- 2
mindspore/model_zoo/mobilenetv2/scripts/run_train.sh View File

@@ -42,6 +42,7 @@ run_ascend()
--server_id=$3 \ --server_id=$3 \
--training_script=${BASEPATH}/../train.py \ --training_script=${BASEPATH}/../train.py \
--dataset_path=$5 \ --dataset_path=$5 \
--pre_trained=$6 \
--platform=$1 &> ../train.log & # dataset train folder --platform=$1 &> ../train.log & # dataset train folder
} }


@@ -76,10 +77,10 @@ run_gpu()
&> ../train.log & # dataset train folder &> ../train.log & # dataset train folder
} }


if [ $# -gt 5 ] || [ $# -lt 4 ]
if [ $# -gt 6 ] || [ $# -lt 4 ]
then then
echo "Usage:\n \ 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 \ GPU: sh run_train.sh GPU [DEVICE_NUM] [VISIABLE_DEVICES(0,1,2,3,4,5,6,7)] [DATASET_PATH]\n \
" "
exit 1 exit 1


Loading…
Cancel
Save