Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PALM
提交
56f73f88
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看板
提交
56f73f88
编写于
12月 04, 2019
作者:
W
wangxiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix label_ids
上级
58e7a556
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
8 addition
and
8 deletion
+8
-8
paddlepalm/reader/cls.py
paddlepalm/reader/cls.py
+1
-1
paddlepalm/reader/match.py
paddlepalm/reader/match.py
+1
-1
paddlepalm/reader/mlm.py
paddlepalm/reader/mlm.py
+2
-2
paddlepalm/task_paradigm/cls.py
paddlepalm/task_paradigm/cls.py
+1
-1
paddlepalm/task_paradigm/match.py
paddlepalm/task_paradigm/match.py
+1
-1
paddlepalm/task_paradigm/mlm.py
paddlepalm/task_paradigm/mlm.py
+2
-2
未找到文件。
paddlepalm/reader/cls.py
浏览文件 @
56f73f88
...
@@ -66,7 +66,7 @@ class Reader(reader):
...
@@ -66,7 +66,7 @@ class Reader(reader):
"position_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"position_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"segment_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"segment_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"input_mask"
:
[[
-
1
,
-
1
,
1
],
'float32'
],
"input_mask"
:
[[
-
1
,
-
1
,
1
],
'float32'
],
"label_ids"
:
[[
-
1
,
1
],
'int64'
],
"label_ids"
:
[[
-
1
],
'int64'
],
"task_ids"
:
[[
-
1
,
-
1
],
'int64'
]
"task_ids"
:
[[
-
1
,
-
1
],
'int64'
]
}
}
else
:
else
:
...
...
paddlepalm/reader/match.py
浏览文件 @
56f73f88
...
@@ -64,7 +64,7 @@ class Reader(reader):
...
@@ -64,7 +64,7 @@ class Reader(reader):
"position_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"position_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"segment_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"segment_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"input_mask"
:
[[
-
1
,
-
1
,
1
],
'float32'
],
"input_mask"
:
[[
-
1
,
-
1
,
1
],
'float32'
],
"label_ids"
:
[[
-
1
,
1
],
'int64'
],
"label_ids"
:
[[
-
1
],
'int64'
],
"task_ids"
:
[[
-
1
,
-
1
],
'int64'
]
"task_ids"
:
[[
-
1
,
-
1
],
'int64'
]
}
}
else
:
else
:
...
...
paddlepalm/reader/mlm.py
浏览文件 @
56f73f88
...
@@ -65,8 +65,8 @@ class Reader(reader):
...
@@ -65,8 +65,8 @@ class Reader(reader):
"segment_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"segment_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"input_mask"
:
[[
-
1
,
-
1
,
1
],
'float32'
],
"input_mask"
:
[[
-
1
,
-
1
,
1
],
'float32'
],
"task_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"task_ids"
:
[[
-
1
,
-
1
],
'int64'
],
"mask_label"
:
[[
-
1
,
1
],
'int64'
],
"mask_label"
:
[[
-
1
],
'int64'
],
"mask_pos"
:
[[
-
1
,
1
],
'int64'
],
"mask_pos"
:
[[
-
1
],
'int64'
],
}
}
...
...
paddlepalm/task_paradigm/cls.py
浏览文件 @
56f73f88
...
@@ -43,7 +43,7 @@ class TaskParadigm(task_paradigm):
...
@@ -43,7 +43,7 @@ class TaskParadigm(task_paradigm):
@
property
@
property
def
inputs_attrs
(
self
):
def
inputs_attrs
(
self
):
if
self
.
_is_training
:
if
self
.
_is_training
:
reader
=
{
"label_ids"
:
[[
-
1
,
1
],
'int64'
]}
reader
=
{
"label_ids"
:
[[
-
1
],
'int64'
]}
else
:
else
:
reader
=
{}
reader
=
{}
bb
=
{
"sentence_embedding"
:
[[
-
1
,
self
.
_hidden_size
],
'float32'
]}
bb
=
{
"sentence_embedding"
:
[[
-
1
,
self
.
_hidden_size
],
'float32'
]}
...
...
paddlepalm/task_paradigm/match.py
浏览文件 @
56f73f88
...
@@ -44,7 +44,7 @@ class TaskParadigm(task_paradigm):
...
@@ -44,7 +44,7 @@ class TaskParadigm(task_paradigm):
@
property
@
property
def
inputs_attrs
(
self
):
def
inputs_attrs
(
self
):
if
self
.
_is_training
:
if
self
.
_is_training
:
reader
=
{
"label_ids"
:
[[
-
1
,
1
],
'int64'
]}
reader
=
{
"label_ids"
:
[[
-
1
],
'int64'
]}
else
:
else
:
reader
=
{}
reader
=
{}
bb
=
{
"sentence_pair_embedding"
:
[[
-
1
,
self
.
_hidden_size
],
'float32'
]}
bb
=
{
"sentence_pair_embedding"
:
[[
-
1
,
self
.
_hidden_size
],
'float32'
]}
...
...
paddlepalm/task_paradigm/mlm.py
浏览文件 @
56f73f88
...
@@ -33,8 +33,8 @@ class TaskParadigm(task_paradigm):
...
@@ -33,8 +33,8 @@ class TaskParadigm(task_paradigm):
@
property
@
property
def
inputs_attrs
(
self
):
def
inputs_attrs
(
self
):
reader
=
{
reader
=
{
"mask_label"
:
[[
-
1
,
1
],
'int64'
],
"mask_label"
:
[[
-
1
],
'int64'
],
"mask_pos"
:
[[
-
1
,
1
],
'int64'
]}
"mask_pos"
:
[[
-
1
],
'int64'
]}
if
not
self
.
_is_training
:
if
not
self
.
_is_training
:
del
reader
[
'mask_label'
]
del
reader
[
'mask_label'
]
del
reader
[
'batchsize_x_seqlen'
]
del
reader
[
'batchsize_x_seqlen'
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录