Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PALM
提交
04c08043
P
PALM
项目概览
PaddlePaddle
/
PALM
通知
5
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PALM
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
04c08043
编写于
2月 19, 2020
作者:
X
Xiaoyao Xi
提交者:
GitHub
2月 19, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #62 from wangxiao1021/api
update mrc
上级
70cedfbd
d87bd156
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
7 deletion
+6
-7
README.md
README.md
+2
-2
examples/mrc/README.md
examples/mrc/README.md
+1
-1
examples/mrc/run.py
examples/mrc/run.py
+3
-4
未找到文件。
README.md
浏览文件 @
04c08043
...
@@ -103,8 +103,8 @@ You can easily re-produce following competitive results with minor codes, which
...
@@ -103,8 +103,8 @@ You can easily re-produce following competitive results with minor codes, which
<td>
94.9
</td>
<td>
94.9
</td>
<td>
94.5
</td>
<td>
94.5
</td>
<td>
94.7
</td>
<td>
94.7
</td>
<td>
96
.3
</td>
<td>
64
.3
</td>
<td>
8
4.0
</td>
<td>
8
5.2
</td>
</tr>
</tr>
</tbody>
</tbody>
...
...
examples/mrc/README.md
浏览文件 @
04c08043
...
@@ -94,5 +94,5 @@ The evaluation results are as follows:
...
@@ -94,5 +94,5 @@ The evaluation results are as follows:
```
```
data_num: 3219
data_num: 3219
em_sroce:
0.963031997515, f1: 83.986540297
3
em_sroce:
64.3367505436, f1: 85.178189684
3
```
```
examples/mrc/run.py
浏览文件 @
04c08043
...
@@ -9,7 +9,7 @@ if __name__ == '__main__':
...
@@ -9,7 +9,7 @@ if __name__ == '__main__':
# configs
# configs
max_seqlen
=
512
max_seqlen
=
512
batch_size
=
8
batch_size
=
8
num_epochs
=
8
num_epochs
=
2
lr
=
3e-5
lr
=
3e-5
doc_stride
=
128
doc_stride
=
128
max_query_len
=
64
max_query_len
=
64
...
@@ -64,8 +64,7 @@ if __name__ == '__main__':
...
@@ -64,8 +64,7 @@ if __name__ == '__main__':
# step 8-1*: load pretrained parameters
# step 8-1*: load pretrained parameters
trainer
.
load_pretrain
(
pre_params
)
trainer
.
load_pretrain
(
pre_params
)
# step 8-2*: set saver to save model
# step 8-2*: set saver to save model
# save_steps = (n_steps-8) // 4
save_steps
=
3040
save_steps
=
1520
trainer
.
set_saver
(
save_path
=
save_path
,
save_steps
=
save_steps
,
save_type
=
save_type
)
trainer
.
set_saver
(
save_path
=
save_path
,
save_steps
=
save_steps
,
save_type
=
save_type
)
# step 8-3: start training
# step 8-3: start training
trainer
.
train
(
print_steps
=
print_steps
)
trainer
.
train
(
print_steps
=
print_steps
)
...
@@ -90,7 +89,7 @@ if __name__ == '__main__':
...
@@ -90,7 +89,7 @@ if __name__ == '__main__':
trainer
.
build_predict_forward
(
pred_ernie
,
mrc_pred_head
)
trainer
.
build_predict_forward
(
pred_ernie
,
mrc_pred_head
)
# step 6: load checkpoint
# step 6: load checkpoint
pred_model_path
=
'./outputs/ckpt.step'
+
str
(
1216
0
)
pred_model_path
=
'./outputs/ckpt.step'
+
str
(
304
0
)
trainer
.
load_ckpt
(
pred_model_path
)
trainer
.
load_ckpt
(
pred_model_path
)
# step 7: fit prepared reader and data
# step 7: fit prepared reader and data
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录