From 193877bd82344768730ffebc3611230398f57966 Mon Sep 17 00:00:00 2001 From: Tesla Date: Fri, 20 May 2022 11:40:05 +0800 Subject: [PATCH] Update README_ERNIE.md --- .../tasks/text_classification/README_ERNIE.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erniekit_appzoo/erniekit_appzoo/tasks/text_classification/README_ERNIE.md b/erniekit_appzoo/erniekit_appzoo/tasks/text_classification/README_ERNIE.md index 0086e23e..2eccdb8f 100644 --- a/erniekit_appzoo/erniekit_appzoo/tasks/text_classification/README_ERNIE.md +++ b/erniekit_appzoo/erniekit_appzoo/tasks/text_classification/README_ERNIE.md @@ -4,7 +4,7 @@ - 进入分类任务的目录./erniekit_appzoo/tasks/text_classification -```json +``` cd ./erniekit_appzoo/tasks/text_classification ``` @@ -22,7 +22,7 @@ cd ../tasks/text_classification - 配置文件:./examples/cls_ernie_fc_ch.json -```json +``` { "dataset_reader": { "train_reader": { @@ -170,7 +170,7 @@ cd ../tasks/text_classification ## 训练ERNIE模型 -```json +``` python run_trainer.py --param_path ./examples/cls_ernie_fc_ch.json ``` @@ -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": { @@ -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中修改输出路径)。 \ No newline at end of file +- 预测结果保存于./output/predict_result.txt文件中(可在./examples/cls_ernie_fc_ch_infer.json中修改输出路径)。