Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
fcc50cb4
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
fcc50cb4
编写于
11月 08, 2017
作者:
C
Cao Ying
提交者:
GitHub
11月 08, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5437 from ranqiu92/doc
Update annotations of layers.py.
上级
f72729d4
f1fac487
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
44 addition
and
39 deletion
+44
-39
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+44
-39
未找到文件。
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
fcc50cb4
...
...
@@ -6548,26 +6548,27 @@ def switch_order_layer(input,
@
layer_support
()
def
crop_layer
(
input
,
offset
,
axis
=
2
,
shape
=
None
,
name
=
None
,
layer_attr
=
None
):
"""
This layer crops images by offset and shape. User can set crop shape by
args 'shape' explicitly or by reference input layer.
This layer crops images according to the offset and shape. Users can set
the crop shape through the argument 'shape' explicitly or by specifying a
reference input layer.
The example usage is:
.. code-block:: python
crop = crop_layer(input=[image_input, reference_input], axis=2, offset=[2, 3])
:param input: The input of this layer. If two inputs are given, the second
input
will be regarded as
reference input
.
:param input: The input of this layer. If two inputs are given, the second
one
will be regarded as
the reference
.
:type input: LayerOutput | Sequence
:param offset: The crop offset.
:type offset: Sequence
:param axis:
start axis to be cropped. To
image input layer:
:param axis:
The start axis to be cropped. For
image input layer:
- 0: batch size
- 1: channels
- 2: height
- 3: width
:type
partial_sum
: int
:param shape: The shape to be cropped. Default is None.
:type
axis
: int
:param shape: The shape to be cropped
to
. Default is None.
:type shape: Sequence | None
:param name: The name of this layer. It is optional.
:type name: basestring
...
...
@@ -6702,9 +6703,9 @@ def seq_slice_layer(input, starts, ends, name=None):
:type name: basestring
:param input: The input of this layer, which should be a sequence.
:type input: LayerOutput
:param starts: start indices to slice the input sequence.
:param starts:
The
start indices to slice the input sequence.
:type starts: LayerOutput | None
:param ends: end indices to slice the input sequence.
:param ends:
The
end indices to slice the input sequence.
:type ends: LayerOutput | None
:return: LayerOutput object.
:rtype: LayerOutput
...
...
@@ -6744,7 +6745,7 @@ def seq_slice_layer(input, starts, ends, name=None):
@
layer_support
()
def
kmax_seq_score_layer
(
input
,
name
=
None
,
beam_size
=
1
):
"""
This layer accepts one input which
are
scores over a sequence or a nested
This layer accepts one input which
is
scores over a sequence or a nested
sequence, and returns indices of beam_size sequences with highest scores.
.. code-block:: python
...
...
@@ -6754,11 +6755,11 @@ def kmax_seq_score_layer(input, name=None, beam_size=1):
:param name: The name of this layer. It is optional.
:type name: basestring
:param input: The input of this layer. It stores scores over a sequence or
a nested
sequence and its size must be 1.
:param input: The input of this layer. It stores scores over a sequence or
a nested
sequence and its size must be 1.
:type input: LayerOutput
:param beam_size:
sequence indi
ces with top beam_size scores are returned.
:type beam_size:
double
:param beam_size:
The indices of the sequen
ces with top beam_size scores are returned.
:type beam_size:
int
:return: LayerOutput object.
:rtype: LayerOutput
"""
...
...
@@ -6814,38 +6815,42 @@ def img_conv3d_layer(input,
:type name: basestring
:param input: The input of this layer.
:type input: LayerOutput
:param filter_size: The x dimension of a filter kernel. Or input a list.
:param filter_size: The dimensions of the filter kernel along three axises. If the parameter
is set to one integer, the three dimensions will be same.
:type filter_size: int | tuple | list
:param num_filters: Each filter group's number of filter
:param num_filters: The number of filters in each group.
:type num_filters: int
:param act: Activation type. ReluActivation is the default.
:type act: BaseActivation
:param groups:
Group size of filter
s.
:param groups:
The number of the filter group
s.
:type groups: int
:param stride: The
x dimension of the stride. Or input a tuple for two image
dimension
.
:param stride: The
strides of the convolution along three axises. If the parameter
is set to one integer, the three strides will be same
.
:type stride: int | tuple | list
:param padding: The
x dimension of the padding. Or input a tuple for tw
o
image dimension
:param padding: The
numbers of padding along three axises. If the parameter is set t
o
one integer, they will be same.
:type padding: int | tuple | list
:param bias_attr: Convolution bias attribute. None means default bias.
False means no bias.
:param bias_attr: The Bias Attribute. If the parameter is set to
False or something not type of ParameterAttribute,
no bias is defined. If the parameter is set to
True, the bias is initialized to zero.
:type bias_attr: ParameterAttribute | None | bool | Any
:param num_channels: number of input channels. If None will be set
automatically from previous output.
:param num_channels: The number of input channels. If the parameter is not set or
set to None, its actual value will be automatically set to
the channels number of the input .
:type num_channels: int
:param param_attr:
Convolution param attribute. None means default attribute
:param param_attr:
The parameter attribute of the convolution.
:type param_attr: ParameterAttribute
:param shared_biases:
Is
biases will be shared between filters or not.
:param shared_biases:
Whether
biases will be shared between filters or not.
:type shared_biases: bool
:param layer_attr:
Layer Extra Attribute
.
:param layer_attr:
Extra layer attributes
.
:type layer_attr: ExtraLayerAttribute
:param trans:
true if it is a convTransLayer, f
alse if it is a convLayer
:param trans:
True if it is a convTransLayer, F
alse if it is a convLayer
:type trans: bool
:param layer_type: specify the layer_type, default is None. If trans=True,
layer_type has to be "exconvt" or "cudnn_convt",
otherwise layer_type has to be either "exconv" or
"cudnn_conv"
:type layer_type: String
:param layer_type: Specify the layer_type. If the parameter is set, it must be "deconv3d"
when trans=True. If not set, it will be automatically set to "deconv3d"
when trans=True and "conv3d" when trans=False.
:type layer_type: basestring
:return: LayerOutput object.
:rtype: LayerOutput
"""
...
...
@@ -6927,7 +6932,7 @@ def img_conv3d_layer(input,
def
scale_shift_layer
(
input
,
name
=
None
,
param_attr
=
None
,
bias_attr
=
None
):
"""
A layer applies a linear transformation to each element in each row of
the input matrix. For each element, the layer first re-scale it and then
the input matrix. For each element, the layer first re-scale
s
it and then
adds a bias to it.
This layer is very like the SlopeInterceptLayer, except the scale and
...
...
@@ -7001,12 +7006,12 @@ def sub_seq_layer(input, offsets, sizes, act=None, bias_attr=None, name=None):
:type name: basestring
:param input: The input of this layer, which should be sequence.
:type input: LayerOutput
:param offsets:
offset indices to slice the input sequence, which should be
sequence type.
:param offsets:
The offset indices to slice the input sequence, which should
be
sequence type.
:type offsets: LayerOutput
:param sizes: sizes of the sub-sequences, which should be sequence type.
:param sizes:
The
sizes of the sub-sequences, which should be sequence type.
:type sizes: LayerOutput
:param act:
Layer activation, default is LinearActivation
:param act:
Activation type, LinearActivation is the default.
:type act: BaseActivation.
:param bias_attr: The Bias Attribute. If the parameter is set to
False or something not type of ParameterAttribute,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录