diff --git a/mindinsight/wizard/README.md b/mindinsight/wizard/README.md index 715f22381eff18aec6253fc951198c5bba3b2ddb..6a3d1ff2c6ad52eae3a398eed03c484e9e3a4d55 100644 --- a/mindinsight/wizard/README.md +++ b/mindinsight/wizard/README.md @@ -48,6 +48,7 @@ project | |- config.py # parameter configuration | |- dataset.py # data preprocessing | |- lenet.py/resent.py/... # network definition + | |- ... |- eval.py # evaluate network |- train.py # train network |- README.md @@ -78,23 +79,39 @@ $ mindwizard project 1: MNIST [1]: 1 -lenet is generated in $PWD/project +project is generated in $PWD/project $ cd $PWD/project/scripts ``` ### Training +Distributed training + +``` +# Ascend +Usage: bash run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) + +# GPU +Usage: bash run_distribute_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) ``` -# distributed training -Usage: ./run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) -# standalone training -Usage: ./run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) +Standalone training + +``` +# Ascend +Usage: bash run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) + +# GPU +Usage: bash run_standalone_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) ``` ### Evaluation ``` -Usage: ./run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH] +# Ascend +Usage: bash run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH] + +# GPU +Usage: bash run_eval_gpu.sh [DATASET_PATH] [CHECKPOINT_PATH] ``` diff --git a/mindinsight/wizard/README_CN.md b/mindinsight/wizard/README_CN.md index 79ada9272023656628f097c164fc08f4df47409a..4c153be7271eaa9b3bf1fabb63037baeaedf82d4 100644 --- a/mindinsight/wizard/README_CN.md +++ b/mindinsight/wizard/README_CN.md @@ -48,6 +48,7 @@ project | |- config.py # 参数配置 | |- dataset.py # 数据集处理 | |- lenet.py/resent.py/... # 网络定义 + | |- ... |- eval.py # 网络推理 |- train.py # 网络训练 |- README.md @@ -78,23 +79,39 @@ $ mindwizard project 1: MNIST [1]: 1 -lenet is generated in $PWD/project +project is generated in $PWD/project $ cd $PWD/project/scripts ``` ### 训练 +多卡训练 + +``` +# Ascend +Usage: bash run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) + +# GPU +Usage: bash run_distribute_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) ``` -# 多卡训练 -Usage: ./run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) -# 单卡训练 -Usage: ./run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) +单卡训练 + +``` +# Ascend +Usage: bash run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) + +# GPU +Usage: bash run_standalone_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional) ``` ### 评估 ``` -Usage: ./run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH] +# Ascend +Usage: bash run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH] + +# GPU +Usage: bash run_eval_gpu.sh [DATASET_PATH] [CHECKPOINT_PATH] ``` diff --git a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train.sh-tpl b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train.sh-tpl index 1c2b2ea4de6ffb0b76b23d5d378300ff66906601..b08fef2690fa05de04bc2f22ed0f59cc902a7f17 100644 --- a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 2 ] && [ $# != 3 ] then - echo "Usage: sh run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train_gpu.sh-tpl b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train_gpu.sh-tpl index 434c1282f36d59a41fc891b6d5f069e5dfa58f1d..88296279164558830f72780a8a635a671c51811e 100644 --- a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train_gpu.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train_gpu.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 1 ] && [ $# != 2 ] then - echo "Usage: sh run_distribute_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_distribute_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval.sh-tpl b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval.sh-tpl index cc2507e6b6331277b4fc55e30083b15b0b638867..7df933f2af5ed9fe0e984d25dcdaba2573243039 100644 --- a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 2 ] then - echo "Usage: sh run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH]" + echo "Usage: bash run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH]" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval_gpu.sh-tpl b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval_gpu.sh-tpl index 6a9e379c6cc904e8f9488169a3246e53f087483f..9c0ebfca88588cf5e1f34a4e9b579b90a8f02323 100644 --- a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval_gpu.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval_gpu.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 2 ] then - echo "Usage: sh run_eval_gpu.sh [DATASET_PATH] [CHECKPOINT_PATH]" + echo "Usage: bash run_eval_gpu.sh [DATASET_PATH] [CHECKPOINT_PATH]" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train.sh-tpl b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train.sh-tpl index 676e39ec328fd956f534e2b2ae67bec902556a30..afe7af3287a44eed34c4c049e78739fdb44eb182 100644 --- a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 1 ] && [ $# != 2 ] then - echo "Usage: sh run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train_gpu.sh-tpl b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train_gpu.sh-tpl index 57e047f92725da88e3cef2fdaf2221f4bb4fbc35..37664f5e1c377cdb323cca482158db6463373c7e 100644 --- a/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train_gpu.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train_gpu.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 1 ] && [ $# != 2 ] then - echo "Usage: sh run_standalone_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_standalone_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train.sh-tpl b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train.sh-tpl index 6eff3748211dec636bf5ec8f71fb03f0a371ef03..da292eb4b08b665df4c3275860ecd34c82765383 100755 --- a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 2 ] && [ $# != 3 ] then - echo "Usage: sh run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train_gpu.sh-tpl b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train_gpu.sh-tpl index b0954f5bd34e4f28b480f6d3a2944893c4b45e96..b88fcdc447d74c46f8beee19a9e330408936b5a2 100755 --- a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train_gpu.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train_gpu.sh-tpl @@ -15,7 +15,7 @@ # ============================================================================ if [ $# != 1 ]&& [ $# != 2 ] then - echo "Usage: sh run_distribute_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_distribute_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval.sh-tpl b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval.sh-tpl index a2cd4624104a7fbe360121eb7551b82edcb7c293..a9ba602957ce3b6702db7a055e0a46590a8058b1 100755 --- a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 2 ] then - echo "Usage: sh run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH]" + echo "Usage: bash run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH]" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval_gpu.sh-tpl b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval_gpu.sh-tpl index 5e8f43ff51a1f4bc85e2065effd9cde9708e3ec3..520de31efa3a7a836a702e2fbf4a520003a0e666 100755 --- a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval_gpu.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval_gpu.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 2 ] then - echo "Usage: sh run_eval_gpu.sh [DATASET_PATH] [CHECKPOINT_PATH]" + echo "Usage: bash run_eval_gpu.sh [DATASET_PATH] [CHECKPOINT_PATH]" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train.sh-tpl b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train.sh-tpl index e610bd060f43b6d4d92db59d2f51b4282220d03d..143a79f9e5037f6c0965b680acb1e3a8d1cf5814 100755 --- a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 1 ] && [ $# != 2 ] then - echo "Usage: sh run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train_gpu.sh-tpl b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train_gpu.sh-tpl index 82525e52d26acbaba5f75f7aaee66d49b76bdc75..50f530f4bc229e1e29ecc0161f3c6f3f5b800998 100755 --- a/mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train_gpu.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train_gpu.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 1 ] && [ $# != 2 ] then - echo "Usage: sh run_standalone_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_standalone_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train.sh-tpl b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train.sh-tpl index 1c2b2ea4de6ffb0b76b23d5d378300ff66906601..b08fef2690fa05de04bc2f22ed0f59cc902a7f17 100644 --- a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 2 ] && [ $# != 3 ] then - echo "Usage: sh run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train_gpu.sh-tpl b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train_gpu.sh-tpl index 337f2ff2268ecc6aeca8df6029f6da26b9ceefab..cd346dc843a339649cae97486b8d74fd55eb78c5 100644 --- a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train_gpu.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train_gpu.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 1 ] && [ $# != 2 ] then - echo "Usage: sh run_distribute_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_distribute_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval.sh-tpl b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval.sh-tpl index cc2507e6b6331277b4fc55e30083b15b0b638867..7df933f2af5ed9fe0e984d25dcdaba2573243039 100644 --- a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 2 ] then - echo "Usage: sh run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH]" + echo "Usage: bash run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH]" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval_gpu.sh-tpl b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval_gpu.sh-tpl index 6a9e379c6cc904e8f9488169a3246e53f087483f..9c0ebfca88588cf5e1f34a4e9b579b90a8f02323 100644 --- a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval_gpu.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval_gpu.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 2 ] then - echo "Usage: sh run_eval_gpu.sh [DATASET_PATH] [CHECKPOINT_PATH]" + echo "Usage: bash run_eval_gpu.sh [DATASET_PATH] [CHECKPOINT_PATH]" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train.sh-tpl b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train.sh-tpl index 676e39ec328fd956f534e2b2ae67bec902556a30..afe7af3287a44eed34c4c049e78739fdb44eb182 100644 --- a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 1 ] && [ $# != 2 ] then - echo "Usage: sh run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi diff --git a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train_gpu.sh-tpl b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train_gpu.sh-tpl index 57e047f92725da88e3cef2fdaf2221f4bb4fbc35..37664f5e1c377cdb323cca482158db6463373c7e 100644 --- a/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train_gpu.sh-tpl +++ b/mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train_gpu.sh-tpl @@ -16,7 +16,7 @@ if [ $# != 1 ] && [ $# != 2 ] then - echo "Usage: sh run_standalone_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" + echo "Usage: bash run_standalone_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)" exit 1 fi