Skip to content
Snippets Groups Projects
Unverified Commit 6d5e6fa4 authored by i-robot's avatar i-robot Committed by Gitee
Browse files

!3118 modify resnet readme and gpt2 scripts

Merge pull request !3118 from anzhengqi/modify-networks
parents f1800798 cdfea5bc
No related branches found
No related tags found
No related merge requests found
......@@ -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)
```
......
......@@ -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/
......
......@@ -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"`
......
......@@ -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):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment