Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
ed7334d6
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ed7334d6
编写于
11月 23, 2016
作者:
H
Haonan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the has_LayerOutput boolean for StaticInput as the input of recurrent_group
上级
85f0e184
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
4 deletion
+5
-4
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+5
-4
未找到文件。
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
ed7334d6
...
@@ -2853,11 +2853,11 @@ def recurrent_group(step,
...
@@ -2853,11 +2853,11 @@ def recurrent_group(step,
:type targetInlink: LayerOutput|SubsequenceInput
:type targetInlink: LayerOutput|SubsequenceInput
:param is_generating: If is generating, none of input type should be LayerOutput;
:param is_generating: If is generating, none of input type should be LayerOutput;
else, for training or testing, one of the input type must
else, for training or testing, one of the input type must
be LayerOutput.
be LayerOutput.
: type is_generating: bool
: type is_generating: bool
:return: LayerOutput object.
:return: LayerOutput object.
:rtype: LayerOutput
:rtype: LayerOutput
"""
"""
...
@@ -2905,15 +2905,16 @@ def recurrent_group(step,
...
@@ -2905,15 +2905,16 @@ def recurrent_group(step,
seq_reversed
=
reverse
,
seq_reversed
=
reverse
,
target_inlinkname
=
targetInlinkName
)
target_inlinkname
=
targetInlinkName
)
in_args
=
[]
in_args
=
[]
has_LayerOutput
=
Tru
e
has_LayerOutput
=
Fals
e
for
each_input
in
input
:
for
each_input
in
input
:
assert
is_single_input
(
each_input
)
assert
is_single_input
(
each_input
)
if
isinstance
(
each_input
,
LayerOutput
):
if
isinstance
(
each_input
,
LayerOutput
):
in_args
.
append
(
each_input
)
in_args
.
append
(
each_input
)
has_LayerOutput
=
True
elif
isinstance
(
each_input
,
SubsequenceInput
):
elif
isinstance
(
each_input
,
SubsequenceInput
):
in_args
.
append
(
each_input
.
input
)
in_args
.
append
(
each_input
.
input
)
has_LayerOutput
=
True
else
:
else
:
has_LayerOutput
=
False
mem_name
=
"__%s_memory__"
%
each_input
.
input
.
name
mem_name
=
"__%s_memory__"
%
each_input
.
input
.
name
mem
=
memory
(
mem
=
memory
(
name
=
mem_name
,
name
=
mem_name
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录