Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
9573256f
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9573256f
编写于
12月 19, 2017
作者:
Y
yangyaming
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove main_program and startup_program.
上级
2a058b10
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
17 deletion
+4
-17
python/paddle/v2/fluid/layers/nn.py
python/paddle/v2/fluid/layers/nn.py
+4
-17
未找到文件。
python/paddle/v2/fluid/layers/nn.py
浏览文件 @
9573256f
...
...
@@ -764,7 +764,7 @@ def conv2d_transpose(input,
return
out
def
sequence_expand
(
x
,
y
,
main_program
=
None
,
startup_program
=
None
):
def
sequence_expand
(
x
,
y
):
"""Sequence Expand Layer. This layer will expand the input variable **x**
according to LoD information of **y**. And the following examples will
explain how sequence_expand works:
...
...
@@ -808,8 +808,6 @@ def sequence_expand(x, y, main_program=None, startup_program=None):
Args:
x (Variable): The input variable which is a Tensor or LoDTensor.
y (Variable): The input variable which is a LoDTensor.
main_program (Program): The main program.
startup_program (Program): The startup program.
Returns:
Variable: The expanded variable which is a LoDTensor.
...
...
@@ -836,9 +834,7 @@ def lstm_unit(x_t,
cell_t_prev
,
forget_bias
=
0.0
,
param_attr
=
None
,
bias_attr
=
None
,
main_program
=
None
,
startup_program
=
None
):
bias_attr
=
None
):
"""Lstm unit layer. The equation of a lstm step is:
.. math::
...
...
@@ -881,8 +877,6 @@ def lstm_unit(x_t,
initializer, name etc.
bias_attr (ParamAttr): The attributes of bias weights, if not False,
bias weights will be created and be set to default value.
main_program (Program): The main program.
startup_program (Program): the startup program.
Returns:
tuple: The hidden value and cell value of lstm unit.
...
...
@@ -923,18 +917,11 @@ def lstm_unit(x_t,
bias_attr
=
ParamAttr
()
size
=
cell_t_prev
.
shape
[
1
]
concat_out
=
concat
(
input
=
[
x_t
,
hidden_t_prev
],
axis
=
1
,
main_program
=
main_program
,
startup_program
=
startup_program
)
concat_out
=
concat
(
input
=
[
x_t
,
hidden_t_prev
],
axis
=
1
)
fc_out
=
fc
(
input
=
concat_out
,
size
=
4
*
size
,
param_attr
=
param_attr
,
bias_attr
=
bias_attr
,
act
=
'linear'
,
main_program
=
main_program
,
startup_program
=
startup_program
)
bias_attr
=
bias_attr
)
dtype
=
x_t
.
dtype
c
=
helper
.
create_tmp_variable
(
dtype
)
h
=
helper
.
create_tmp_variable
(
dtype
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录