Commit 819d90cc authored by yangzhong's avatar yangzhong
Browse files

修改README

parent 13c631c3
......@@ -71,7 +71,7 @@ python3 setup.py install
4.其它非特殊库参照requirements.txt安装
```
## 数据集和预训练模型
## 数据集
数据集下载地址:https://s3.bmio.net/kashgari/china-people-daily-ner-corpus.tar.gz
人民日报数据集存放在目录/datasets/bert-base-chinese目录下,然后解压。
......@@ -98,8 +98,7 @@ cd examples/sequence_labeling/
# 修改训练脚本配置文件
crf.py # 单卡训练脚本
crf_ddp.py # 多卡训练脚本 多卡训练使用torch的ddp,在单卡训练代码基础上增加DDP的相关内容
仅修改配置文件路径,包括config_path, checkpoint_path, dict_path, train_dataloader, valid_dtaloader,根据需要调整batch_size大小。
注:如果需要测试fp16,可以修改crf_ddp.py和crf.py中model.compile(),添加use_amp=True。
仅修改配置文件路径,包括config_path, checkpoint_path, dict_path, train_dataloader, valid_dtaloader,根据需要调整batch_size大小。配置文件修改成argparse参数控制形式,可以在单机单卡启动脚本single_train.sh和多机多卡启动脚本multi_train.sh中对参数进行调整。
```
### 单机单卡
......@@ -114,7 +113,7 @@ cd examples/sequence_labeling/
```
## result
## 精度
### 精度
| 卡数 | 类型 | batch_size | f1 | p | r |
| ---- | ---- | ---------- | ------ | ------ | ------ |
......
Markdown is supported
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