<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple</em>) – The input of this layer.</li>
<li><strong>size</strong> (<em>int</em>) – The layer dimension.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Tanh is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Tanh is the default activation.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The Parameter Attribute|list.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
...
...
@@ -263,7 +263,7 @@ parameter is set to True, the bias is initialized to zero.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple</em>) – The input of this layer.</li>
<li><strong>select</strong> (<em>paddle.v2.config_base.Layer</em>) – The select layer. The output of select layer should be a
sparse binary matrix, and treat as the mask of selective fc.
If is None, acts exactly like fc.</li>
<li><strong>size</strong> (<em>int</em>) – The layer dimension.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The Parameter Attribute.</li>
<li><strong>select</strong> (<em>paddle.v2.config_base.Layer</em>) – The layer to select columns to output. It should be a sparse
binary matrix, and is treated as the mask of selective fc. If
it is not set or set to None, selective_fc acts exactly
like fc.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer, which should be equal to that of
the layer ‘select’.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default activation.</li>
<li><strong>pass_generation</strong> (<em>bool</em>) – The flag which indicates whether it is during generation.</li>
<li><strong>has_selected_colums</strong> (<em>bool</em>) – The flag which indicates whether the parameter ‘select’
has been set. True is the default.</li>
<li><strong>mul_ratio</strong> (<em>float</em>) – A ratio helps to judge how sparse the output is and determine
the computation method for speed consideration.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The parameter attribute for bias. If this parameter is set to
False or an object whose type is not paddle.v2.attr.ParameterAttribute,
no bias is defined. If this parameter is set to True,
the bias is initialized to zero.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – Extra Layer config.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -313,7 +322,7 @@ the bias is initialized to zero.</li>
<dd><p>Different from img_conv, conv_op is an Operator, which can be used
in mixed. And conv_op takes two inputs to perform convolution.
The first input is the image and the second is filter kernel. It only
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>filter_size</strong> (<em>int</em>) – The x dimension of a filter kernel.</li>
<li><strong>filter_size_y</strong> (<em>int</em>) – The y dimension of a filter kernel. Since
PaddlePaddle now supports rectangular filters,
the filter’s shape can be (filter_size, filter_size_y).</li>
<li><strong>num_filters</strong> (<em>int</em>) – channel of output data.</li>
<li><strong>num_channels</strong> (<em>int</em>) – channel of input data.</li>
<li><strong>stride</strong> (<em>int</em>) – The x dimension of the stride.</li>
<li><strong>stride_y</strong> (<em>int</em>) – The y dimension of the stride.</li>
<li><strong>padding</strong> (<em>int</em>) – The x dimension of padding.</li>
<li><strong>padding_y</strong> (<em>int</em>) – The y dimension of padding.</li>
<li><strong>filter_size</strong> (<em>int | tuple | list</em>) – The dimensions of the filter kernel. If the parameter is
set to one integer, the two dimensions on x and y axises
will be same when filter_size_y is not set. If it is set
to a list, the first element indicates the dimension on
the x axis, and the second is used to specify the dimension
on the y axis when filter_size is not provided.</li>
<li><strong>filter_size_y</strong> (<em>int</em>) – The dimension of the filter kernel on the y axis. If the parameter
is not set, it will be set automatically according to filter_size.</li>
<li><strong>num_filters</strong> (<em>int</em>) – The number of filters.</li>
<li><strong>num_channels</strong> (<em>int</em>) – The number of the input channels.</li>
<li><strong>stride</strong> (<em>int | tuple | list</em>) – The strides. If the parameter is set to one integer, the strides
on x and y axises will be same when stride_y is not set. If it is
set to a list, the first element indicates the stride on the x axis,
and the second is used to specify the stride on the y axis when
stride_y is not provided.</li>
<li><strong>stride_y</strong> (<em>int</em>) – The stride on the y axis.</li>
<li><strong>padding</strong> (<em>int | tuple | list</em>) – The padding sizes. If the parameter is set to one integer, the padding
sizes on x and y axises will be same when padding_y is not set. If it
is set to a list, the first element indicates the padding size on the
x axis, and the second is used to specify the padding size on the y axis
when padding_y is not provided.</li>
<li><strong>padding_y</strong> (<em>int</em>) – The padding size on the y axis.</li>
<li><strong>groups</strong> (<em>int</em>) – The group number.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – Convolution param attribute. None means default attribute</li>
<li><strong>trans</strong> (<em>bool</em>) – whether it is convTrans or conv</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute of the convolution. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>trans</strong> (<em>bool</em>) – Whether it is ConvTransProjection or ConvProjection</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – layer’s extra attribute.</li>
<li><strong>a</strong> (<em>paddle.v2.config_base.Layer</em>) – The first input of this layer.</li>
<li><strong>b</strong> (<em>paddle.v2.config_base.Layer</em>) – The second input of this layer.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -498,7 +525,7 @@ two image dimension.</li>
currently supports rectangular filters, the filter’s
shape will be (filter_size, filter_size_y).</li>
<li><strong>num_filters</strong>– Each filter group’s number of filter</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Relu is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Relu is the default activation.</li>
<li><strong>groups</strong> (<em>int</em>) – Group size of filters.</li>
<li><strong>stride</strong> (<em>int | tuple | list</em>) – The x dimension of the stride. Or input a tuple for two image
dimension.</li>
...
...
@@ -614,7 +641,7 @@ number plus one equals context_len.</p>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>context_len</strong> (<em>int</em>) – The context length equals the lookahead step number
plus one.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default activation.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
<li>Multi-digit Number Recognition from Street View Imagery using Deep Convolutional Neural Networks: <aclass="reference external"href="https://arxiv.org/pdf/1312.6082v4.pdf">https://arxiv.org/pdf/1312.6082v4.pdf</a></li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The parameter attribute for bias. If this parameter is set to
False or an object whose type is not paddle.v2.attr.ParameterAttribute,
no bias is defined. If the parameter is set to True,
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -1135,7 +1166,7 @@ more details about LSTM.</p>
<li><strong>size</strong> (<em>int</em>) – DEPRECATED. size of the lstm cell</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>reverse</strong> (<em>bool</em>) – is sequence process reversed or not.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default. <spanclass="math">\(h_t\)</span></li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default activation.</li>
<li><strong>gate_act</strong> (<em>paddle.v2.activation.Base</em>) – gate activation type, paddle.v2.activation.Sigmoid by default.</li>
<li><strong>state_act</strong> (<em>paddle.v2.activation.Base</em>) – state activation type, paddle.v2.activation.Tanh by default.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
...
...
@@ -1295,8 +1326,8 @@ It is ignored when name is provided.</li>
<dd><p>Recurrent layer group is an extremely flexible recurrent unit in
PaddlePaddle. As long as the user defines the calculation done within a
time step, PaddlePaddle will iterate such a recurrent calculation over
sequence input. This is extremely usefull for attention based model, or
Neural Turning Machine like models.</p>
sequence input. This is useful for attention-based models, or Neural
<li><strong>state</strong> (<em>paddle.v2.config_base.Layer</em>) – State Layer. <spanclass="math">\(c_{t-1}\)</span></li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default.</li>
<li><strong>gate_act</strong> (<em>paddle.v2.activation.Base</em>) – Gate Activation Type. paddle.v2.activation.Sigmoid is the default.</li>
<li><strong>state_act</strong> (<em>paddle.v2.activation.Base</em>) – State Activation Type. paddle.v2.activation.Tanh is the default.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | True</em>) – The parameter attribute for bias. If this parameter is
set to True or None, the bias is initialized to zero.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – layer’s extra attribute.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer’s output, which must be
equal to the dimension of the state.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>state</strong> (<em>paddle.v2.config_base.Layer</em>) – The state of the LSTM unit.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default activation.</li>
<li><strong>gate_act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of the gate. paddle.v2.activation.Sigmoid is the
default activation.</li>
<li><strong>state_act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of the state. paddle.v2.activation.Tanh is the
default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
parameter is set to True, the bias is initialized to zero.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for details.</li>
</ul>
</td>
</tr>
...
...
@@ -1417,19 +1449,22 @@ set to True or None, the bias is initialized to zero.</li>
<li><strong>name</strong>– The name of this layer. It is optional.</li>
<li><strong>gate_act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of this layer’s two gates. Default is Sigmoid.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer, whose dimension can be divided by 3.</li>
<li><strong>output_mem</strong> (<em>paddle.v2.config_base.Layer</em>) – A memory which memorizes the output of this layer at previous
time step.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer’s output. If it is not set or set to None,
it will be set to one-third of the dimension of the input automatically.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of this layer’s output. paddle.v2.activation.Tanh
is the default activation.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>gate_act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of this layer’s two gates. paddle.v2.activation.Sigmoid is
the default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The parameter attribute for bias. If this parameter is set to
False or an object whose type is not paddle.v2.attr.ParameterAttribute, no bias
is defined. If this parameter is set to True,
the bias is initialized to zero.</li>
<li><strong>param_attr</strong>– the parameter_attribute for transforming the output_mem
from previous step.</li>
<li><strong>layer_attr</strong>–</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for details.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for details.</li>
</ul>
</td>
</tr>
...
...
@@ -1483,7 +1518,8 @@ to maintain tractability.</p>
<li><strong>input</strong>– The input of this layer. It is an optional parameter. If set,
then this function will just return layer’s name.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
parameter is set to True, the bias is initialized to zero.</li>
...
...
@@ -2138,7 +2175,7 @@ Inputs can be list of paddle.v2.config_base.Layer or list of projection.</p>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default activation.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – Extra Layer Attribute.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>num_channels</strong> (<em>int | None</em>) – The channel number of input layer.</li>
<li><strong>num_channels</strong> (<em>int</em>) – 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.</li>
<li><strong>block_x</strong> (<em>int</em>) – The width of sub block.</li>
<li><strong>block_y</strong> (<em>int</em>) – The width of sub block.</li>
<li><strong>stride_x</strong> (<em>int</em>) – The stride size in horizontal direction.</li>
<li><strong>stride_y</strong> (<em>int</em>) – The stride size in vertical direction.</li>
<li><strong>padding_x</strong> (<em>int</em>) – The padding size in horizontal direction.</li>
<li><strong>padding_y</strong> (<em>int</em>) – The padding size in vertical direction.</li>
<li><strong>name</strong> (<em>None | basestring.</em>) – The name of this layer. It is optional.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – Extra Layer config.</li>
<li><strong>name</strong> (<em>basestring.</em>) – The name of this layer. It is optional.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -2441,7 +2481,7 @@ in the column direction. This is equivalent to apply
concat() with num_repeats same input.
False for treating input as column vector and repeating
in the row direction.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default activation.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – extra layer attributes.</li>
</ul>
</td>
...
...
@@ -2517,7 +2557,7 @@ output sequence has T*M/N instances, the dimension of each instance is N.</p>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>reshape_size</strong> (<em>int</em>) – the size of reshaped sequence.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default activation.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – extra layer attributes.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
...
...
@@ -2573,7 +2613,7 @@ Please refer to dropout for details.</p>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple</em>) – Input layers. It could be a paddle.v2.config_base.Layer or list/tuple of
paddle.v2.config_base.Layer.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
parameter is set to True, the bias is initialized to zero.</li>
...
...
@@ -2638,9 +2678,10 @@ processed in one batch.</p>
<li><strong>size</strong> (<em>int.</em>) – the layer dimension.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Linear is the default.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The Parameter Attribute.</li>
<li><strong>a</strong> (<em>paddle.v2.config_base.Layer</em>) – The first input of this layer.</li>
<li><strong>b</strong> (<em>paddle.v2.config_base.Layer</em>) – The second input of this layer.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Linear is the default activation.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The parameter attribute for bias. If this parameter is set to
False or an object whose type is not paddle.v2.attr.ParameterAttribute,
no bias is defined. If this parameter is set to True,
the bias is initialized to zero.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – Extra Layer config.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -3113,7 +3156,8 @@ The result is stored in output.ids.</p>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The first input layer is the feature.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer</em>) – The second input layer is label.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The first input layer.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer</em>) – The input label.</li>
<li><strong>size</strong> (<em>int</em>) – The category number.</li>
<li><strong>weight</strong> (<em>paddle.v2.config_base.Layer</em>) – The third layer is “weight” of each sample, which is an
optional argument.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – Parameter attribute. None means default attribute</li>
<li><strong>name</strong> (<em>None | basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>coeff</strong> (<em>float</em>) – The coefficient affects the gradient in the backward.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – Extra Layer config.</li>
<li><strong>weight</strong> (<em>paddle.v2.config_base.Layer</em>) – The weight layer defines a weight for each sample in the
mini-batch. It is optional.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>coeff</strong> (<em>float</em>) – The weight of the gradient in the back propagation.
1.0 is the default value.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The first input layer.</li>
<li><strong>size</strong> (<em>int</em>) – size of this layer.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer</em><em> or </em><em>None</em>) – None or ground-truth label.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – Parameter attribute. None means default attribute</li>
<li><strong>name</strong> (<em>None | basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – Extra Layer config.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer | None</em>) – The input label.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -3769,18 +3825,21 @@ decoding or 0 for correct decoding.</p>
<dd><p>Connectionist Temporal Classification (CTC) is designed for temporal
classication task. That is, for sequence labeling problems where the
classication task. e.g. sequence labeling problems where the
alignment between the inputs and the target labels is unknown.</p>
<p>More details can be found by referring to <aclass="reference external"href="http://machinelearning.wustl.edu/mlpapers/paper_files/icml2006_GravesFGS06.pdf">Connectionist Temporal
Classification: Labelling Unsegmented Sequence Data with Recurrent
Neural Networks</a></p>
<dlclass="docutils">
<dt>Reference:</dt>
<dd>Connectionist Temporal Classification: Labelling Unsegmented Sequence Data
the official one, is maintained to enable more compiling options. During the
building process, PaddlePaddle will clone the source codes, build and
install it to <codeclass="code docutils literal"><spanclass="pre">third_party/install/warpctc</span></code> directory.</p>
<p>More details of CTC can be found by referring to <aclass="reference external"href="http://machinelearning.wustl.edu/mlpapers/paper_files/icml2006_GravesFGS06.pdf">Connectionist Temporal
Classification: Labelling Unsegmented Sequence Data with Recurrent
Neural Networks</a>.</p>
<dlclass="docutils">
<dt>Reference:</dt>
<dd>Connectionist Temporal Classification: Labelling Unsegmented Sequence Data
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple | collections.Sequence</em>) – The input layers. It should be a paddle.v2.config_base.Layer or a list/tuple
of paddle.v2.config_base.Layer.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer</em>) – The ground truth.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple | collections.Sequence</em>) – The first input of this layer.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer</em>) – The input label.</li>
<li><strong>weight</strong> (<em>paddle.v2.config_base.Layer</em>) – The weight layer defines a weight for each sample in the
mini-batch. The default value is None.</li>
<li><strong>num_classes</strong> (<em>int</em>) – The class number.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute|list</em>) – The parameter attributes.</li>
<li><strong>num_neg_samples</strong> (<em>int</em>) – The number of sampled negative labels. The default
value is 10.</li>
mini-batch. It is optional.</li>
<li><strong>num_classes</strong> (<em>int</em>) – The number of classes.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Sigmoid is the default activation.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>num_neg_samples</strong> (<em>int</em>) – The number of sampled negative labels. 10 is the
default value.</li>
<li><strong>neg_distribution</strong> (<em>list | tuple | collections.Sequence | None</em>) – The discrete noisy distribution over the output
space from which num_neg_samples negative labels
are sampled. If this parameter is not set, a
uniform distribution will be used. A userdefined
uniform distribution will be used. A user-defined
distribution is a list whose length must be equal
to the num_classes. Each member of the list defines
the probability of a class given input x.</li>
...
...
@@ -3919,11 +3982,12 @@ the probability of a class given input x.</li>
False or an object whose type is not paddle.v2.attr.ParameterAttribute,
no bias is defined. If this parameter is set to True,
the bias is initialized to zero.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – Extra Layer Attribute.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>eos_id</strong> (<em>int</em>) – end id of sequence</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – extra layer attributes.</li>
<li><strong>eos_id</strong> (<em>int</em>) – End id of sequence</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -4189,7 +4254,7 @@ details.</li>
<dd><p>The gated unit layer implements a simple gating mechanism over the input.
The input <spanclass="math">\(X\)</span> is first projected into a new space <spanclass="math">\(X'\)</span>, and
it is also used to produce a gate weight <spanclass="math">\(\sigma\)</span>. Element-wise
product between <ahref="#id11"><spanclass="problematic"id="id12">:match:`X’`</span></a> and <spanclass="math">\(\sigma\)</span> is finally returned.</p>
product between <ahref="#id10"><spanclass="problematic"id="id11">:match:`X’`</span></a> and <spanclass="math">\(\sigma\)</span> is finally returned.</p>
<dlclass="docutils">
<dt>Reference:</dt>
<dd>Language Modeling with Gated Convolutional Networks
...
...
@@ -4205,7 +4270,8 @@ product between <a href="#id11"><span class="problematic" id="id12">:match:`X
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer’s output.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of the projection. paddle.v2.activation.Linear is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of the projection. paddle.v2.activation.Linear is the default
activation.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>gate_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – The extra layer attribute of the gate. See paddle.v2.attr.ExtraAttribute for
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple</em>) – The input of this layer.</li>
<li><strong>size</strong> (<em>int</em>) – The layer dimension.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Tanh is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Tanh is the default activation.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The Parameter Attribute|list.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
...
...
@@ -277,7 +277,7 @@ parameter is set to True, the bias is initialized to zero.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple</em>) – The input of this layer.</li>
<li><strong>select</strong> (<em>paddle.v2.config_base.Layer</em>) – The select layer. The output of select layer should be a
sparse binary matrix, and treat as the mask of selective fc.
If is None, acts exactly like fc.</li>
<li><strong>size</strong> (<em>int</em>) – The layer dimension.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The Parameter Attribute.</li>
<li><strong>select</strong> (<em>paddle.v2.config_base.Layer</em>) – The layer to select columns to output. It should be a sparse
binary matrix, and is treated as the mask of selective fc. If
it is not set or set to None, selective_fc acts exactly
like fc.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer, which should be equal to that of
the layer ‘select’.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default activation.</li>
<li><strong>pass_generation</strong> (<em>bool</em>) – The flag which indicates whether it is during generation.</li>
<li><strong>has_selected_colums</strong> (<em>bool</em>) – The flag which indicates whether the parameter ‘select’
has been set. True is the default.</li>
<li><strong>mul_ratio</strong> (<em>float</em>) – A ratio helps to judge how sparse the output is and determine
the computation method for speed consideration.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The parameter attribute for bias. If this parameter is set to
False or an object whose type is not paddle.v2.attr.ParameterAttribute,
no bias is defined. If this parameter is set to True,
the bias is initialized to zero.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – Extra Layer config.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -327,7 +336,7 @@ the bias is initialized to zero.</li>
<dd><p>Different from img_conv, conv_op is an Operator, which can be used
in mixed. And conv_op takes two inputs to perform convolution.
The first input is the image and the second is filter kernel. It only
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>filter_size</strong> (<em>int</em>) – The x dimension of a filter kernel.</li>
<li><strong>filter_size_y</strong> (<em>int</em>) – The y dimension of a filter kernel. Since
PaddlePaddle now supports rectangular filters,
the filter’s shape can be (filter_size, filter_size_y).</li>
<li><strong>num_filters</strong> (<em>int</em>) – channel of output data.</li>
<li><strong>num_channels</strong> (<em>int</em>) – channel of input data.</li>
<li><strong>stride</strong> (<em>int</em>) – The x dimension of the stride.</li>
<li><strong>stride_y</strong> (<em>int</em>) – The y dimension of the stride.</li>
<li><strong>padding</strong> (<em>int</em>) – The x dimension of padding.</li>
<li><strong>padding_y</strong> (<em>int</em>) – The y dimension of padding.</li>
<li><strong>filter_size</strong> (<em>int | tuple | list</em>) – The dimensions of the filter kernel. If the parameter is
set to one integer, the two dimensions on x and y axises
will be same when filter_size_y is not set. If it is set
to a list, the first element indicates the dimension on
the x axis, and the second is used to specify the dimension
on the y axis when filter_size is not provided.</li>
<li><strong>filter_size_y</strong> (<em>int</em>) – The dimension of the filter kernel on the y axis. If the parameter
is not set, it will be set automatically according to filter_size.</li>
<li><strong>num_filters</strong> (<em>int</em>) – The number of filters.</li>
<li><strong>num_channels</strong> (<em>int</em>) – The number of the input channels.</li>
<li><strong>stride</strong> (<em>int | tuple | list</em>) – The strides. If the parameter is set to one integer, the strides
on x and y axises will be same when stride_y is not set. If it is
set to a list, the first element indicates the stride on the x axis,
and the second is used to specify the stride on the y axis when
stride_y is not provided.</li>
<li><strong>stride_y</strong> (<em>int</em>) – The stride on the y axis.</li>
<li><strong>padding</strong> (<em>int | tuple | list</em>) – The padding sizes. If the parameter is set to one integer, the padding
sizes on x and y axises will be same when padding_y is not set. If it
is set to a list, the first element indicates the padding size on the
x axis, and the second is used to specify the padding size on the y axis
when padding_y is not provided.</li>
<li><strong>padding_y</strong> (<em>int</em>) – The padding size on the y axis.</li>
<li><strong>groups</strong> (<em>int</em>) – The group number.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – Convolution param attribute. None means default attribute</li>
<li><strong>trans</strong> (<em>bool</em>) – whether it is convTrans or conv</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute of the convolution. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>trans</strong> (<em>bool</em>) – Whether it is ConvTransProjection or ConvProjection</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – layer’s extra attribute.</li>
<li><strong>a</strong> (<em>paddle.v2.config_base.Layer</em>) – The first input of this layer.</li>
<li><strong>b</strong> (<em>paddle.v2.config_base.Layer</em>) – The second input of this layer.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -512,7 +539,7 @@ two image dimension.</li>
currently supports rectangular filters, the filter’s
shape will be (filter_size, filter_size_y).</li>
<li><strong>num_filters</strong>– Each filter group’s number of filter</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Relu is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Relu is the default activation.</li>
<li><strong>groups</strong> (<em>int</em>) – Group size of filters.</li>
<li><strong>stride</strong> (<em>int | tuple | list</em>) – The x dimension of the stride. Or input a tuple for two image
dimension.</li>
...
...
@@ -628,7 +655,7 @@ number plus one equals context_len.</p>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>context_len</strong> (<em>int</em>) – The context length equals the lookahead step number
plus one.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default activation.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
<li>Multi-digit Number Recognition from Street View Imagery using Deep Convolutional Neural Networks: <aclass="reference external"href="https://arxiv.org/pdf/1312.6082v4.pdf">https://arxiv.org/pdf/1312.6082v4.pdf</a></li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The parameter attribute for bias. If this parameter is set to
False or an object whose type is not paddle.v2.attr.ParameterAttribute,
no bias is defined. If the parameter is set to True,
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -1149,7 +1180,7 @@ more details about LSTM.</p>
<li><strong>size</strong> (<em>int</em>) – DEPRECATED. size of the lstm cell</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>reverse</strong> (<em>bool</em>) – is sequence process reversed or not.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default. <spanclass="math">\(h_t\)</span></li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default activation.</li>
<li><strong>gate_act</strong> (<em>paddle.v2.activation.Base</em>) – gate activation type, paddle.v2.activation.Sigmoid by default.</li>
<li><strong>state_act</strong> (<em>paddle.v2.activation.Base</em>) – state activation type, paddle.v2.activation.Tanh by default.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
...
...
@@ -1309,8 +1340,8 @@ It is ignored when name is provided.</li>
<dd><p>Recurrent layer group is an extremely flexible recurrent unit in
PaddlePaddle. As long as the user defines the calculation done within a
time step, PaddlePaddle will iterate such a recurrent calculation over
sequence input. This is extremely usefull for attention based model, or
Neural Turning Machine like models.</p>
sequence input. This is useful for attention-based models, or Neural
<li><strong>state</strong> (<em>paddle.v2.config_base.Layer</em>) – State Layer. <spanclass="math">\(c_{t-1}\)</span></li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default.</li>
<li><strong>gate_act</strong> (<em>paddle.v2.activation.Base</em>) – Gate Activation Type. paddle.v2.activation.Sigmoid is the default.</li>
<li><strong>state_act</strong> (<em>paddle.v2.activation.Base</em>) – State Activation Type. paddle.v2.activation.Tanh is the default.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | True</em>) – The parameter attribute for bias. If this parameter is
set to True or None, the bias is initialized to zero.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – layer’s extra attribute.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer’s output, which must be
equal to the dimension of the state.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>state</strong> (<em>paddle.v2.config_base.Layer</em>) – The state of the LSTM unit.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Tanh is the default activation.</li>
<li><strong>gate_act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of the gate. paddle.v2.activation.Sigmoid is the
default activation.</li>
<li><strong>state_act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of the state. paddle.v2.activation.Tanh is the
default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
parameter is set to True, the bias is initialized to zero.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for details.</li>
</ul>
</td>
</tr>
...
...
@@ -1431,19 +1463,22 @@ set to True or None, the bias is initialized to zero.</li>
<li><strong>name</strong>– The name of this layer. It is optional.</li>
<li><strong>gate_act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of this layer’s two gates. Default is Sigmoid.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer, whose dimension can be divided by 3.</li>
<li><strong>output_mem</strong> (<em>paddle.v2.config_base.Layer</em>) – A memory which memorizes the output of this layer at previous
time step.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer’s output. If it is not set or set to None,
it will be set to one-third of the dimension of the input automatically.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of this layer’s output. paddle.v2.activation.Tanh
is the default activation.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>gate_act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of this layer’s two gates. paddle.v2.activation.Sigmoid is
the default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The parameter attribute for bias. If this parameter is set to
False or an object whose type is not paddle.v2.attr.ParameterAttribute, no bias
is defined. If this parameter is set to True,
the bias is initialized to zero.</li>
<li><strong>param_attr</strong>– the parameter_attribute for transforming the output_mem
from previous step.</li>
<li><strong>layer_attr</strong>–</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for details.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for details.</li>
</ul>
</td>
</tr>
...
...
@@ -1497,7 +1532,8 @@ to maintain tractability.</p>
<li><strong>input</strong>– The input of this layer. It is an optional parameter. If set,
then this function will just return layer’s name.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
parameter is set to True, the bias is initialized to zero.</li>
...
...
@@ -2152,7 +2189,7 @@ Inputs can be list of paddle.v2.config_base.Layer or list of projection.</p>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default activation.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – Extra Layer Attribute.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>num_channels</strong> (<em>int | None</em>) – The channel number of input layer.</li>
<li><strong>num_channels</strong> (<em>int</em>) – 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.</li>
<li><strong>block_x</strong> (<em>int</em>) – The width of sub block.</li>
<li><strong>block_y</strong> (<em>int</em>) – The width of sub block.</li>
<li><strong>stride_x</strong> (<em>int</em>) – The stride size in horizontal direction.</li>
<li><strong>stride_y</strong> (<em>int</em>) – The stride size in vertical direction.</li>
<li><strong>padding_x</strong> (<em>int</em>) – The padding size in horizontal direction.</li>
<li><strong>padding_y</strong> (<em>int</em>) – The padding size in vertical direction.</li>
<li><strong>name</strong> (<em>None | basestring.</em>) – The name of this layer. It is optional.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – Extra Layer config.</li>
<li><strong>name</strong> (<em>basestring.</em>) – The name of this layer. It is optional.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -2455,7 +2495,7 @@ in the column direction. This is equivalent to apply
concat() with num_repeats same input.
False for treating input as column vector and repeating
in the row direction.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default activation.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – extra layer attributes.</li>
</ul>
</td>
...
...
@@ -2531,7 +2571,7 @@ output sequence has T*M/N instances, the dimension of each instance is N.</p>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>reshape_size</strong> (<em>int</em>) – the size of reshaped sequence.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default activation.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – extra layer attributes.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
...
...
@@ -2587,7 +2627,7 @@ Please refer to dropout for details.</p>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple</em>) – Input layers. It could be a paddle.v2.config_base.Layer or list/tuple of
paddle.v2.config_base.Layer.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. paddle.v2.activation.Linear is the default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
parameter is set to True, the bias is initialized to zero.</li>
...
...
@@ -2652,9 +2692,10 @@ processed in one batch.</p>
<li><strong>size</strong> (<em>int.</em>) – the layer dimension.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Linear is the default.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The Parameter Attribute.</li>
<li><strong>a</strong> (<em>paddle.v2.config_base.Layer</em>) – The first input of this layer.</li>
<li><strong>b</strong> (<em>paddle.v2.config_base.Layer</em>) – The second input of this layer.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Linear is the default activation.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) – The parameter attribute for bias. If this parameter is set to
False or an object whose type is not paddle.v2.attr.ParameterAttribute,
no bias is defined. If this parameter is set to True,
the bias is initialized to zero.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – Extra Layer config.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -3127,7 +3170,8 @@ The result is stored in output.ids.</p>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The first input layer is the feature.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer</em>) – The second input layer is label.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The first input layer.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer</em>) – The input label.</li>
<li><strong>size</strong> (<em>int</em>) – The category number.</li>
<li><strong>weight</strong> (<em>paddle.v2.config_base.Layer</em>) – The third layer is “weight” of each sample, which is an
optional argument.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – Parameter attribute. None means default attribute</li>
<li><strong>name</strong> (<em>None | basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>coeff</strong> (<em>float</em>) – The coefficient affects the gradient in the backward.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – Extra Layer config.</li>
<li><strong>weight</strong> (<em>paddle.v2.config_base.Layer</em>) – The weight layer defines a weight for each sample in the
mini-batch. It is optional.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>coeff</strong> (<em>float</em>) – The weight of the gradient in the back propagation.
1.0 is the default value.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The first input layer.</li>
<li><strong>size</strong> (<em>int</em>) – size of this layer.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer</em><em> or </em><em>None</em>) – None or ground-truth label.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – Parameter attribute. None means default attribute</li>
<li><strong>name</strong> (<em>None | basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – Extra Layer config.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer | None</em>) – The input label.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -3783,18 +3839,21 @@ decoding or 0 for correct decoding.</p>
<dd><p>Connectionist Temporal Classification (CTC) is designed for temporal
classication task. That is, for sequence labeling problems where the
classication task. e.g. sequence labeling problems where the
alignment between the inputs and the target labels is unknown.</p>
<p>More details can be found by referring to <aclass="reference external"href="http://machinelearning.wustl.edu/mlpapers/paper_files/icml2006_GravesFGS06.pdf">Connectionist Temporal
Classification: Labelling Unsegmented Sequence Data with Recurrent
Neural Networks</a></p>
<dlclass="docutils">
<dt>Reference:</dt>
<dd>Connectionist Temporal Classification: Labelling Unsegmented Sequence Data
the official one, is maintained to enable more compiling options. During the
building process, PaddlePaddle will clone the source codes, build and
install it to <codeclass="code docutils literal"><spanclass="pre">third_party/install/warpctc</span></code> directory.</p>
<p>More details of CTC can be found by referring to <aclass="reference external"href="http://machinelearning.wustl.edu/mlpapers/paper_files/icml2006_GravesFGS06.pdf">Connectionist Temporal
Classification: Labelling Unsegmented Sequence Data with Recurrent
Neural Networks</a>.</p>
<dlclass="docutils">
<dt>Reference:</dt>
<dd>Connectionist Temporal Classification: Labelling Unsegmented Sequence Data
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple | collections.Sequence</em>) – The input layers. It should be a paddle.v2.config_base.Layer or a list/tuple
of paddle.v2.config_base.Layer.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer</em>) – The ground truth.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple | collections.Sequence</em>) – The first input of this layer.</li>
<li><strong>label</strong> (<em>paddle.v2.config_base.Layer</em>) – The input label.</li>
<li><strong>weight</strong> (<em>paddle.v2.config_base.Layer</em>) – The weight layer defines a weight for each sample in the
mini-batch. The default value is None.</li>
<li><strong>num_classes</strong> (<em>int</em>) – The class number.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute|list</em>) – The parameter attributes.</li>
<li><strong>num_neg_samples</strong> (<em>int</em>) – The number of sampled negative labels. The default
value is 10.</li>
mini-batch. It is optional.</li>
<li><strong>num_classes</strong> (<em>int</em>) – The number of classes.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Sigmoid is the default activation.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) – The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>num_neg_samples</strong> (<em>int</em>) – The number of sampled negative labels. 10 is the
default value.</li>
<li><strong>neg_distribution</strong> (<em>list | tuple | collections.Sequence | None</em>) – The discrete noisy distribution over the output
space from which num_neg_samples negative labels
are sampled. If this parameter is not set, a
uniform distribution will be used. A userdefined
uniform distribution will be used. A user-defined
distribution is a list whose length must be equal
to the num_classes. Each member of the list defines
the probability of a class given input x.</li>
...
...
@@ -3933,11 +3996,12 @@ the probability of a class given input x.</li>
False or an object whose type is not paddle.v2.attr.ParameterAttribute,
no bias is defined. If this parameter is set to True,
the bias is initialized to zero.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – Extra Layer Attribute.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>eos_id</strong> (<em>int</em>) – end id of sequence</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – extra layer attributes.</li>
<li><strong>eos_id</strong> (<em>int</em>) – End id of sequence</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
...
...
@@ -4203,7 +4268,7 @@ details.</li>
<dd><p>The gated unit layer implements a simple gating mechanism over the input.
The input <spanclass="math">\(X\)</span> is first projected into a new space <spanclass="math">\(X'\)</span>, and
it is also used to produce a gate weight <spanclass="math">\(\sigma\)</span>. Element-wise
product between <ahref="#id11"><spanclass="problematic"id="id12">:match:`X’`</span></a> and <spanclass="math">\(\sigma\)</span> is finally returned.</p>
product between <ahref="#id10"><spanclass="problematic"id="id11">:match:`X’`</span></a> and <spanclass="math">\(\sigma\)</span> is finally returned.</p>
<dlclass="docutils">
<dt>Reference:</dt>
<dd>Language Modeling with Gated Convolutional Networks
...
...
@@ -4219,7 +4284,8 @@ product between <a href="#id11"><span class="problematic" id="id12">:match:`X
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – The input of this layer.</li>
<li><strong>size</strong> (<em>int</em>) – The dimension of this layer’s output.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of the projection. paddle.v2.activation.Linear is the default.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type of the projection. paddle.v2.activation.Linear is the default
activation.</li>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</li>
<li><strong>gate_attr</strong> (<em>paddle.v2.attr.ExtraAttribute | None</em>) – The extra layer attribute of the gate. See paddle.v2.attr.ExtraAttribute for