From 958f4634205ccaa089b5f28f99367b9d0bcbfdb0 Mon Sep 17 00:00:00 2001 From: xubangduo <xubangduo@huawei.com> Date: Mon, 23 May 2022 20:34:47 +0800 Subject: [PATCH] update README of transformer --- official/nlp/transformer/README.md | 28 +++++++++++++++++++-------- official/nlp/transformer/README_CN.md | 26 +++++++++++++++++++------ 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/official/nlp/transformer/README.md b/official/nlp/transformer/README.md index 70ec27561..bd48d47b2 100644 --- a/official/nlp/transformer/README.md +++ b/official/nlp/transformer/README.md @@ -203,14 +203,24 @@ bash scripts/run_eval.sh GPU [DEVICE_ID] [MINDRECORD_DATA] [CKPT_PATH] [CONFIG_P ```shell . 鈹斺攢Transformer + 鈹溾攢README_CN.md 鈹溾攢README.md + 鈹溾攢ascend310_infer + 鈹溾攢build.sh + 鈹溾攢CMakeLists.txt + 鈹溾攢inc + 鈹� 鈹斺攢utils.h + 鈹斺攢src + 鈹溾攢main.cc + 鈹斺攢utils.cc 鈹溾攢scripts 鈹溾攢process_output.sh 鈹溾攢replace-quote.perl - 鈹溾攢run_distribute_train_ascend.sh 鈹溾攢run_distribute_train_ascend_multi_machines.sh - 鈹溾攢run_eval.sh + 鈹溾攢run_distribute_train_ascend.sh + 鈹溾攢run_distribute_train_gpu.sh 鈹溾攢run_eval_onnx.sh // bash script for ONNX evaluation + 鈹溾攢run_eval.sh 鈹溾攢run_infer_310.sh 鈹斺攢run_standalone_train.sh 鈹溾攢src @@ -224,20 +234,22 @@ bash scripts/run_eval.sh GPU [DEVICE_ID] [MINDRECORD_DATA] [CKPT_PATH] [CONFIG_P 鈹溾攢transformer_model.py 鈹溾攢weight_init.py 鈹斺攢model_utils + 鈹溾攢__init__.py 鈹溾攢config.py 鈹溾攢device_adapter.py 鈹溾攢local_adapter.py 鈹斺攢moxing_adapter.py - 鈹溾攢default_config.yaml - 鈹溾攢default_config_large.yaml - 鈹溾攢default_config_large_gpu.yaml 鈹溾攢create_data.py + 鈹溾攢default_config_large_gpu.yaml + 鈹溾攢default_config_large.yaml + 鈹溾攢default_config.yaml + 鈹溾攢eval_onnx.py // script for ONNX evaluation 鈹溾攢eval.py - 鈹溾攢eval.py // script for ONNX evaluation 鈹溾攢export.py 鈹溾攢mindspore_hub_conf.py 鈹溾攢postprocess.py 鈹溾攢preprocess.py + 鈹溾攢requirements.txt 鈹斺攢train.py ``` @@ -418,7 +430,7 @@ Parameters for learning rate: ### [Export MindIR](#contents) ```shell -python export.py --model_file [CKPT_PATH] --file_name [FILE_NAME] --file_format [FILE_FORMAT] +python export.py --model_file [CKPT_PATH] --file_name [FILE_NAME] --file_format [FILE_FORMAT] --config_path [CONFIG_PATH] ``` The ckpt_file parameter is required, @@ -430,7 +442,7 @@ Before performing inference, the mindir file must be exported by `export.py` scr ```shell # Ascend310 inference -bash run_infer_310.sh [MINDIR_PATH] [NEED_PREPROCESS] [DEVICE_ID] +bash run_infer_310.sh [MINDIR_PATH] [NEED_PREPROCESS] [DEVICE_ID] [CONFIG_PATH] ``` - `NEED_PREPROCESS` means weather need preprocess or not, it's value is 'y' or 'n'. diff --git a/official/nlp/transformer/README_CN.md b/official/nlp/transformer/README_CN.md index 8125622f6..378f6c3c3 100644 --- a/official/nlp/transformer/README_CN.md +++ b/official/nlp/transformer/README_CN.md @@ -204,12 +204,23 @@ bash scripts/run_eval.sh GPU [DEVICE_ID] [MINDRECORD_DATA] [CKPT_PATH] [CONFIG_P ```shell . 鈹斺攢Transformer + 鈹溾攢README_CN.md 鈹溾攢README.md + 鈹溾攢ascend310_infer + 鈹溾攢build.sh + 鈹溾攢CMakeLists.txt + 鈹溾攢inc + 鈹� 鈹斺攢utils.h + 鈹斺攢src + 鈹溾攢main.cc + 鈹斺攢utils.cc 鈹溾攢scripts 鈹溾攢process_output.sh 鈹溾攢replace-quote.perl - 鈹溾攢run_distribute_train_ascend.sh 鈹溾攢run_distribute_train_ascend_multi_machines.sh + 鈹溾攢run_distribute_train_ascend.sh + 鈹溾攢run_distribute_train_gpu.sh + 鈹溾攢run_eval_onnx.sh 鈹溾攢run_eval.sh 鈹溾攢run_infer_310.sh 鈹斺攢run_standalone_train.sh @@ -224,19 +235,22 @@ bash scripts/run_eval.sh GPU [DEVICE_ID] [MINDRECORD_DATA] [CKPT_PATH] [CONFIG_P 鈹溾攢transformer_model.py 鈹溾攢weight_init.py 鈹斺攢model_utils + 鈹溾攢__init__.py 鈹溾攢config.py 鈹溾攢device_adapter.py 鈹溾攢local_adapter.py 鈹斺攢moxing_adapter.py - 鈹溾攢default_config.yaml - 鈹溾攢default_config_large.yaml - 鈹溾攢default_config_large_gpu.yaml 鈹溾攢create_data.py + 鈹溾攢default_config_large_gpu.yaml + 鈹溾攢default_config_large.yaml + 鈹溾攢default_config.yaml + 鈹溾攢eval_onnx.py 鈹溾攢eval.py 鈹溾攢export.py 鈹溾攢mindspore_hub_conf.py 鈹溾攢postprocess.py 鈹溾攢preprocess.py + 鈹溾攢requirements.txt 鈹斺攢train.py ``` @@ -390,7 +404,7 @@ Parameters for learning rate: ### [瀵煎嚭MindIR](#contents) ```shell -python export.py --model_file [CKPT_PATH] --file_name [FILE_NAME] --file_format [FILE_FORMAT] +python export.py --model_file [CKPT_PATH] --file_name [FILE_NAME] --file_format [FILE_FORMAT] --config_path [CONFIG_PATH] ``` 鍙傛暟ckpt_file涓哄繀濉」锛� @@ -402,7 +416,7 @@ python export.py --model_file [CKPT_PATH] --file_name [FILE_NAME] --file_format ```shell # Ascend310 鎺ㄧ悊 -bash run_infer_310.sh [MINDIR_PATH] [NEED_PREPROCESS] [DEVICE_ID] +bash run_infer_310.sh [MINDIR_PATH] [NEED_PREPROCESS] [DEVICE_ID] [CONFIG_PATH] ``` - `NEED_PREPROCESS` 琛ㄧず鏄惁闇€瑕佸鏁版嵁闆嗚繘琛岄澶勭悊, 鍙栧€间负'y' 鎴栬€� 'n'銆� -- GitLab