Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PALM
提交
35b8b083
P
PALM
项目概览
PaddlePaddle
/
PALM
通知
8
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看板
未验证
提交
35b8b083
编写于
11月 27, 2019
作者:
X
Xiaoyao Xi
提交者:
GitHub
11月 27, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #30 from wangxiao1021/windows-fix
fix bugs
上级
6e7f2d2c
f37789a5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
4 addition
and
4 deletion
+4
-4
paddlepalm/utils/reader_helper.py
paddlepalm/utils/reader_helper.py
+3
-3
setup.py
setup.py
+1
-1
未找到文件。
paddlepalm/utils/reader_helper.py
浏览文件 @
35b8b083
...
@@ -161,14 +161,14 @@ def create_joint_iterator_fn(iterators, iterator_prefixes, joint_shape_and_dtype
...
@@ -161,14 +161,14 @@ def create_joint_iterator_fn(iterators, iterator_prefixes, joint_shape_and_dtype
if
'token_ids'
in
outputs
:
if
'token_ids'
in
outputs
:
val1
=
len
(
outputs
[
'token_ids'
])
val1
=
len
(
outputs
[
'token_ids'
])
val
=
_check_and_adapt_shape_dtype
(
[
val1
],
[[
1
],
'int64'
]
)
val
=
_check_and_adapt_shape_dtype
(
np
.
array
([
val1
],
dtype
=
'int64'
),
[[
1
],
'int64'
],
iterator_prefixes
[
id
]
+
' tokenids: '
)
results
[
outname_to_pos
[
'batch_size'
]]
=
val
results
[
outname_to_pos
[
'batch_size'
]]
=
val
val2
=
len
(
outputs
[
'token_ids'
][
0
])
val2
=
len
(
outputs
[
'token_ids'
][
0
])
val
=
_check_and_adapt_shape_dtype
(
[
val2
]
,
[[
1
],
'int64'
])
val
=
_check_and_adapt_shape_dtype
(
np
.
array
([
val2
],
dtype
=
'int64'
)
,
[[
1
],
'int64'
])
results
[
outname_to_pos
[
'seqlen'
]]
=
val
results
[
outname_to_pos
[
'seqlen'
]]
=
val
val
=
_check_and_adapt_shape_dtype
(
[
val1
*
val2
]
,
[[
1
],
'int64'
])
val
=
_check_and_adapt_shape_dtype
(
np
.
array
([
val1
*
val2
],
dtype
=
'int64'
)
,
[[
1
],
'int64'
])
results
[
outname_to_pos
[
'batchsize_x_seqlen'
]]
=
val
results
[
outname_to_pos
[
'batchsize_x_seqlen'
]]
=
val
else
:
else
:
if
not
has_show_warn
:
if
not
has_show_warn
:
...
...
setup.py
浏览文件 @
35b8b083
...
@@ -21,7 +21,7 @@ Authors: zhouxiangyang(zhouxiangyang@baidu.com)
...
@@ -21,7 +21,7 @@ Authors: zhouxiangyang(zhouxiangyang@baidu.com)
Date: 2019/09/29 21:00:01
Date: 2019/09/29 21:00:01
"""
"""
import
setuptools
import
setuptools
with
open
(
"README.md"
,
"r"
)
as
fh
:
with
open
(
"README.md"
,
"r"
,
encoding
=
'utf-8'
)
as
fh
:
long_description
=
fh
.
read
()
long_description
=
fh
.
read
()
setuptools
.
setup
(
setuptools
.
setup
(
name
=
"paddlepalm"
,
name
=
"paddlepalm"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录