Skip to content

Commit

Permalink
Update README_ERNIE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
webYFDT authored May 20, 2022
1 parent ff4c410 commit 193877b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- 进入分类任务的目录./erniekit_appzoo/tasks/text_classification

```json
```
cd ./erniekit_appzoo/tasks/text_classification
```

Expand All @@ -22,7 +22,7 @@ cd ../tasks/text_classification

- 配置文件:./examples/cls_ernie_fc_ch.json

```json
```
{
"dataset_reader": {
"train_reader": {
Expand Down Expand Up @@ -170,7 +170,7 @@ cd ../tasks/text_classification

## 训练ERNIE模型

```json
```
python run_trainer.py --param_path ./examples/cls_ernie_fc_ch.json
```

Expand All @@ -184,7 +184,7 @@ python run_trainer.py --param_path ./examples/cls_ernie_fc_ch.json
- 配置文件 ./examples/cls_ernie_fc_ch_infer.json
- 在配置文件./examples/cls_ernie_fc_ch_infer.json中需要更改 inference.inference_model_path 为上面训练过程中所保存的**预测模型的路径**

```json
```
{
"dataset_reader": {
"predict_reader": {
Expand Down Expand Up @@ -242,8 +242,8 @@ python run_trainer.py --param_path ./examples/cls_ernie_fc_ch.json

## ERNIE模型预测

```shell
```
python ./run_infer.py --param_path ./examples/cls_ernie_fc_ch_infer.json
```

- 预测结果保存于./output/predict_result.txt文件中(可在./examples/cls_ernie_fc_ch_infer.json中修改输出路径)。
- 预测结果保存于./output/predict_result.txt文件中(可在./examples/cls_ernie_fc_ch_infer.json中修改输出路径)。

0 comments on commit 193877b

Please sign in to comment.