Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
458271c3
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
458271c3
编写于
10月 17, 2018
作者:
C
chengduozh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
follow comment
test=develop
上级
8c582374
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
16 addition
and
9 deletion
+16
-9
paddle/fluid/API.spec
paddle/fluid/API.spec
+5
-5
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+11
-4
未找到文件。
paddle/fluid/API.spec
浏览文件 @
458271c3
...
@@ -61,11 +61,11 @@ paddle.fluid.layers.cos_sim ArgSpec(args=['X', 'Y'], varargs=None, keywords=None
...
@@ -61,11 +61,11 @@ paddle.fluid.layers.cos_sim ArgSpec(args=['X', 'Y'], varargs=None, keywords=None
paddle.fluid.layers.cross_entropy ArgSpec(args=['input', 'label', 'soft_label', 'ignore_index'], varargs=None, keywords=None, defaults=(False, -100))
paddle.fluid.layers.cross_entropy ArgSpec(args=['input', 'label', 'soft_label', 'ignore_index'], varargs=None, keywords=None, defaults=(False, -100))
paddle.fluid.layers.square_error_cost ArgSpec(args=['input', 'label'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.square_error_cost ArgSpec(args=['input', 'label'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.chunk_eval ArgSpec(args=['input', 'label', 'chunk_scheme', 'num_chunk_types', 'excluded_chunk_types'], varargs=None, keywords=None, defaults=(None,))
paddle.fluid.layers.chunk_eval ArgSpec(args=['input', 'label', 'chunk_scheme', 'num_chunk_types', 'excluded_chunk_types'], varargs=None, keywords=None, defaults=(None,))
paddle.fluid.layers.sequence_conv ArgSpec(args=['input', 'num_filters', 'filter_size', 'filter_stride', 'padding', 'bias_attr', 'param_attr', 'act'
], varargs=None, keywords=None, defaults=(3, 1
, None, None, None, None))
paddle.fluid.layers.sequence_conv ArgSpec(args=['input', 'num_filters', 'filter_size', 'filter_stride', 'padding', 'bias_attr', 'param_attr', 'act'
, 'name'], varargs=None, keywords=None, defaults=(3, 1, None
, None, None, None, None))
paddle.fluid.layers.conv2d ArgSpec(args=['input', 'num_filters', 'filter_size', 'stride', 'padding', 'dilation', 'groups', 'param_attr', 'bias_attr', 'use_cudnn', 'act', 'name'], varargs=None, keywords=None, defaults=(1, 0, 1, None, None, None, True, None, None))
paddle.fluid.layers.conv2d ArgSpec(args=['input', 'num_filters', 'filter_size', 'stride', 'padding', 'dilation', 'groups', 'param_attr', 'bias_attr', 'use_cudnn', 'act', 'name'], varargs=None, keywords=None, defaults=(1, 0, 1, None, None, None, True, None, None))
paddle.fluid.layers.conv3d ArgSpec(args=['input', 'num_filters', 'filter_size', 'stride', 'padding', 'dilation', 'groups', 'param_attr', 'bias_attr', 'use_cudnn', 'act', 'name'], varargs=None, keywords=None, defaults=(1, 0, 1, None, None, None, True, None, None))
paddle.fluid.layers.conv3d ArgSpec(args=['input', 'num_filters', 'filter_size', 'stride', 'padding', 'dilation', 'groups', 'param_attr', 'bias_attr', 'use_cudnn', 'act', 'name'], varargs=None, keywords=None, defaults=(1, 0, 1, None, None, None, True, None, None))
paddle.fluid.layers.sequence_pool ArgSpec(args=['input', 'pool_type'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.sequence_pool ArgSpec(args=['input', 'pool_type'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.sequence_softmax ArgSpec(args=['input', 'use_cudnn'
], varargs=None, keywords=None, defaults=(False,
))
paddle.fluid.layers.sequence_softmax ArgSpec(args=['input', 'use_cudnn'
, 'name'], varargs=None, keywords=None, defaults=(False, None
))
paddle.fluid.layers.softmax ArgSpec(args=['input', 'use_cudnn', 'name'], varargs=None, keywords=None, defaults=(True, None))
paddle.fluid.layers.softmax ArgSpec(args=['input', 'use_cudnn', 'name'], varargs=None, keywords=None, defaults=(True, None))
paddle.fluid.layers.pool2d ArgSpec(args=['input', 'pool_size', 'pool_type', 'pool_stride', 'pool_padding', 'global_pooling', 'use_cudnn', 'ceil_mode', 'name'], varargs=None, keywords=None, defaults=(-1, 'max', 1, 0, False, True, False, None))
paddle.fluid.layers.pool2d ArgSpec(args=['input', 'pool_size', 'pool_type', 'pool_stride', 'pool_padding', 'global_pooling', 'use_cudnn', 'ceil_mode', 'name'], varargs=None, keywords=None, defaults=(-1, 'max', 1, 0, False, True, False, None))
paddle.fluid.layers.pool3d ArgSpec(args=['input', 'pool_size', 'pool_type', 'pool_stride', 'pool_padding', 'global_pooling', 'use_cudnn', 'ceil_mode', 'name'], varargs=None, keywords=None, defaults=(-1, 'max', 1, 0, False, True, False, None))
paddle.fluid.layers.pool3d ArgSpec(args=['input', 'pool_size', 'pool_type', 'pool_stride', 'pool_padding', 'global_pooling', 'use_cudnn', 'ceil_mode', 'name'], varargs=None, keywords=None, defaults=(-1, 'max', 1, 0, False, True, False, None))
...
...
python/paddle/fluid/layers/nn.py
浏览文件 @
458271c3
...
@@ -1265,7 +1265,8 @@ def sequence_conv(input,
...
@@ -1265,7 +1265,8 @@ def sequence_conv(input,
padding
=
None
,
padding
=
None
,
bias_attr
=
None
,
bias_attr
=
None
,
param_attr
=
None
,
param_attr
=
None
,
act
=
None
):
act
=
None
,
name
=
None
):
"""
"""
This function creates the op for sequence_conv, using the inputs and
This function creates the op for sequence_conv, using the inputs and
other convolutional configurations for the filters and stride as given
other convolutional configurations for the filters and stride as given
...
@@ -1287,6 +1288,8 @@ def sequence_conv(input,
...
@@ -1287,6 +1288,8 @@ def sequence_conv(input,
will create ParamAttr as param_attr. If the Initializer of the param_attr
will create ParamAttr as param_attr. If the Initializer of the param_attr
is not set, the parameter is initialized with Xavier. Default: None.
is not set, the parameter is initialized with Xavier. Default: None.
act (str): the activation type
act (str): the activation type
name (str|None): A name for this layer(optional). If set None, the layer
will be named automatically. Default: None.
Returns:
Returns:
Variable: output of sequence_conv
Variable: output of sequence_conv
...
@@ -1315,7 +1318,7 @@ def sequence_conv(input,
...
@@ -1315,7 +1318,7 @@ def sequence_conv(input,
return
helper
.
append_activation
(
pre_act
)
return
helper
.
append_activation
(
pre_act
)
def
sequence_softmax
(
input
,
use_cudnn
=
False
):
def
sequence_softmax
(
input
,
use_cudnn
=
False
,
name
=
None
):
"""
"""
This function computes the softmax activation among all time-steps for each
This function computes the softmax activation among all time-steps for each
sequence. The dimension of each time-step should be 1. Thus, the shape of
sequence. The dimension of each time-step should be 1. Thus, the shape of
...
@@ -1336,7 +1339,9 @@ def sequence_softmax(input, use_cudnn=False):
...
@@ -1336,7 +1339,9 @@ def sequence_softmax(input, use_cudnn=False):
Args:
Args:
input (Variable): The input variable which is a LoDTensor.
input (Variable): The input variable which is a LoDTensor.
use_cudnn (bool): Use cudnn kernel or not, it is valid only when the cudnn
\
use_cudnn (bool): Use cudnn kernel or not, it is valid only when the cudnn
\
library is installed. Default: False
library is installed. Default: False.
name (str|None): A name for this layer(optional). If set None, the layer
will be named automatically. Default: None.
Returns:
Returns:
Variable: output of sequence_softmax
Variable: output of sequence_softmax
...
@@ -1389,6 +1394,8 @@ def softmax(input, use_cudnn=True, name=None):
...
@@ -1389,6 +1394,8 @@ def softmax(input, use_cudnn=True, name=None):
input (Variable): The input variable.
input (Variable): The input variable.
use_cudnn (bool): Use cudnn kernel or not, it is valid only when the cudnn
\
use_cudnn (bool): Use cudnn kernel or not, it is valid only when the cudnn
\
library is installed.
library is installed.
name (str|None): A name for this layer(optional). If set None, the layer
will be named automatically. Default: None.
Returns:
Returns:
Variable: output of softmax
Variable: output of softmax
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录