diff --git a/official/cv/resnet/README.md b/official/cv/resnet/README.md index a6fb7febed601e82c9490992d23e07d0aee22396..50837ab5e2f1b2d8685339f1353211ef1a376796 100644 --- a/official/cv/resnet/README.md +++ b/official/cv/resnet/README.md @@ -482,15 +482,19 @@ bash run_parameter_server_train_gpu.sh [DATASET_PATH] [CONFIG_PATH] [PRETRAINED_ ```bash # evaluation with distributed training Ascend example: +cd scripts/ bash run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) # evaluation with standalone training Ascend example: -bash run_standalone_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) +cd scripts/ +bash run_standalone_train.sh [DATASET_PATH] [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) # evaluation with distributed training GPU example: +cd scripts/ bash run_distribute_train_gpu.sh [DATASET_PATH] [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) # evaluation with standalone training GPU example: +cd scripts/ bash run_standalone_train_gpu.sh [DATASET_PATH] [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) ``` diff --git a/official/cv/resnet/README_CN.md b/official/cv/resnet/README_CN.md index dcaa4ea345900c0717f773d85e6316c6b3d928e6..51f874592606162cb6c9d951807545fd7b5b42f0 100644 --- a/official/cv/resnet/README_CN.md +++ b/official/cv/resnet/README_CN.md @@ -840,10 +840,10 @@ bash run_distribute_train_gpu.sh ../pruner/scop/ ../pruner/scop/resnet50_cifar10 # 分布式训练 cd ./golden_stick/scripts/ # PYTHON_PATH 表示需要应用的算法的'train.py'脚本所在的目录。 -bash run_distribute_train.sh [RANK_TABLE_FILE] [PYTHON_PATH] [DATASET_PATH] [CONFIG_PATH] [PRETRAINED_CKPT_PATH](optional) +bash run_distribute_train.sh [RANK_TABLE_FILE] [PYTHON_PATH] [CONFIG_PATH] [DATASET_PATH] [CKPT_TYPE](optional) [CKPT_PATH](optional) # 分布式训练示例(SCOP算法使用多卡训练) -bash run_standalone_train.sh /path/to/rank_table_file ../pruner/scop/ ../pruner/scop/resnet50_cifar10_config.yaml /path/to/dataset +bash run_distribute_train.sh /path/to/rank_table_file ../pruner/scop/ ../pruner/scop/resnet50_cifar10_config.yaml /path/to/dataset # 单机训练 cd ./golden_stick/scripts/ diff --git a/research/nlp/gpt2/README_CN.md b/research/nlp/gpt2/README_CN.md index 1822062b707d05d8b870453b1d6489de36fdecb0..c7f48086f0fe99460a1a81e3d6822c6ecbb408fc 100644 --- a/research/nlp/gpt2/README_CN.md +++ b/research/nlp/gpt2/README_CN.md @@ -151,6 +151,8 @@ GPT-2脚本及代码结构如下: `python read_weight_tf.py --ckpt_file_path=/{path}/model.ckpt` +> tf模型以model.ckpt开头的有3个文件,分别为.data,.index,.meta文件,此处传参为model.ckpt,而不是任何一个其中的单独文件 + - 在mindspore的环境下,运行`save_weight_ms.py`,示例代码如下: `python save_weight_ms.py --output_file_name="mindspore_gpt2_small.ckpt"` diff --git a/research/nlp/gpt2/convert_tf_ckpt/read_weight_tf.py b/research/nlp/gpt2/convert_tf_ckpt/read_weight_tf.py index 577b656c229f72f9a7d26212f2d362dd2cf8c4be..e37fdb57aada6802be7e379564edcb95a562c35b 100644 --- a/research/nlp/gpt2/convert_tf_ckpt/read_weight_tf.py +++ b/research/nlp/gpt2/convert_tf_ckpt/read_weight_tf.py @@ -24,7 +24,7 @@ import argparse import tensorflow as tf import numpy as np -from .trans_dict import trans_dict_tf +from trans_dict import trans_dict_tf def read_weight(ckpt_path):