@@ -2063,8 +2060,6 @@ class Conv2DTranspose(layers.Layer):
...
@@ -2063,8 +2060,6 @@ class Conv2DTranspose(layers.Layer):
library is installed. Default: True.
library is installed. Default: True.
act (str): Activation type, if it is set to None, activation is not appended.
act (str): Activation type, if it is set to None, activation is not appended.
Default: None.
Default: None.
name(str|None): A name for this layer(optional). If set None, the layer
will be named automatically. Default: True.
Returns:
Returns:
Variable: The tensor variable storing the convolution transpose result.
Variable: The tensor variable storing the convolution transpose result.
...
@@ -2196,11 +2191,11 @@ class SequenceConv(layers.Layer):
...
@@ -2196,11 +2191,11 @@ class SequenceConv(layers.Layer):
in the input parameters to the function.
in the input parameters to the function.
Args:
Args:
name_scope (str): See base class.
name_scope(str): The name of this class.
num_filters (int): number of filters.
num_filters (int): number of filters.
filter_size (int): the filter size (H and W).
filter_size (int): the filter size (H and W). Default: 3.
filter_stride (int): stride of the filter.
filter_stride (int): stride of the filter. Default: 1.
padding (bool): if True, add paddings.
padding (bool|None): if True, add paddings. Default: None
bias_attr (ParamAttr|bool|None): The parameter attribute for the bias of sequence_conv.
bias_attr (ParamAttr|bool|None): The parameter attribute for the bias of sequence_conv.
If it is set to False, no bias will be added to the output units.
If it is set to False, no bias will be added to the output units.
If it is set to None or one attribute of ParamAttr, sequence_conv
If it is set to None or one attribute of ParamAttr, sequence_conv
...
@@ -2212,8 +2207,6 @@ class SequenceConv(layers.Layer):
...
@@ -2212,8 +2207,6 @@ class SequenceConv(layers.Layer):
is not set, the parameter is initialized with Xavier. Default: None.
is not set, the parameter is initialized with Xavier. Default: None.
act (str): Activation type, if it is set to None, activation is not appended.
act (str): Activation type, if it is set to None, activation is not appended.
Default: None.
Default: None.
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
...
@@ -2282,15 +2275,16 @@ class RowConv(layers.Layer):
...
@@ -2282,15 +2275,16 @@ class RowConv(layers.Layer):
More details about row_conv please refer to the design document https://github.com/PaddlePaddle/Paddle/issues/2228#issuecomment-303903645 .
More details about row_conv please refer to the design document https://github.com/PaddlePaddle/Paddle/issues/2228#issuecomment-303903645 .
Args:
Args:
name_scope (str): See base class.
name_scope(str): The name of this class.
future_context_size (int): Future context size. Please note, the shape
future_context_size (int): Future context size. Please note, the shape
of convolution kernel is [future_context_size + 1, D].
of convolution kernel is [future_context_size + 1, D].
param_attr (ParamAttr): Attributes of parameters, including
param_attr (ParamAttr): Attributes of parameters, including
name, initializer etc.
name, initializer etc. Default: None.
act (str): Non-linear activation to be applied to output variable.
act (str): Non-linear activation to be applied to output variable. Default: None.
Returns:
Returns:
the output(Out) is a LodTensor, which supports variable time-length input sequences. The underlying tensor in this LodTensor is a matrix with shape T x N, i.e., the same shape as X.
the output(Out) is a LodTensor, which supports variable time-length input sequences.
The underlying tensor in this LodTensor is a matrix with shape T x N, i.e., the same shape as X.
Examples:
Examples:
.. code-block:: python
.. code-block:: python
...
@@ -2344,10 +2338,10 @@ class GroupNorm(layers.Layer):
...
@@ -2344,10 +2338,10 @@ class GroupNorm(layers.Layer):
Refer to `Group Normalization <https://arxiv.org/abs/1803.08494>`_ .
Refer to `Group Normalization <https://arxiv.org/abs/1803.08494>`_ .
Args:
Args:
name_scope (str): See base class.
name_scope(str): The name of this class.
groups(int): The number of groups that divided from channels.
groups(int): The number of groups that divided from channels.
epsilon(float): The small value added to the variance to prevent
epsilon(float): The small value added to the variance to prevent
division by zero.
division by zero. Default: 1e-05.
param_attr(ParamAttr|None): The parameter attribute for the learnable
param_attr(ParamAttr|None): The parameter attribute for the learnable
scale :math:`g`. If it is set to False, no scale will be added to the output units.
scale :math:`g`. If it is set to False, no scale will be added to the output units.
If it is set to None, the bias is initialized one. Default: None.
If it is set to None, the bias is initialized one. Default: None.
...
@@ -2472,10 +2466,10 @@ class SpectralNorm(layers.Layer):
...
@@ -2472,10 +2466,10 @@ class SpectralNorm(layers.Layer):
Refer to `Spectral Normalization <https://arxiv.org/abs/1802.05957>`_ .
Refer to `Spectral Normalization <https://arxiv.org/abs/1802.05957>`_ .
Args:
Args:
name_scope (str): See base class.
name_scope(str): The name of this class.
dim(int): The index of dimension which should be permuted to the first before reshaping Input(Weight) to matrix, it should be set as 0 if Input(Weight) is the weight of fc layer, and should be set as 1 if Input(Weight) is the weight of conv layer, default 0
dim(int): The index of dimension which should be permuted to the first before reshaping Input(Weight) to matrix, it should be set as 0 if Input(Weight) is the weight of fc layer, and should be set as 1 if Input(Weight) is the weight of conv layer. Default: 0.
power_iters(int): number of power iterations to calculate spectral norm, default 1
power_iters(int): The number of power iterations to calculate spectral norm. Default: 1.
eps(float): epsilon for numerical stability in calculating norms
eps(float): The epsilon for numerical stability in calculating norms. Default: 1e-12.
name (str): The name of this layer. It is optional.
name (str): The name of this layer. It is optional.
Returns:
Returns:
...
@@ -2549,14 +2543,14 @@ class TreeConv(layers.Layer):
...
@@ -2549,14 +2543,14 @@ class TreeConv(layers.Layer):
Args:
Args:
name_scope (str): See base class.
name_scope(str): The name of this class.
output_size(int): output feature width
output_size(int): output feature width
num_filters(int): number of filters, Default 1
num_filters(int): number of filters, Default: 1.
max_depth(int): max depth of filters, Default 2
max_depth(int): max depth of filters, Default: 2.
act(str): activation function, Default tanh
act(str): activation function, Default: tanh.
param_attr(ParamAttr): the parameter attribute for the filters, Default None
param_attr(ParamAttr): the parameter attribute for the filters, Default: None.
bias_attr(ParamAttr): the parameter attribute for the bias of this layer, Default None
bias_attr(ParamAttr): the parameter attribute for the bias of this layer, Default: None.
name(str): a name of this layer(optional). If set None, the layer will be named automatically, Default None
name(str): a name of this layer(optional). If set None, the layer will be named automatically, Default: None.
Returns:
Returns:
out(Variable): (Tensor) The feature vector of subtrees. The shape of the output tensor is [max_tree_node_size, output_size, num_filters]. The output tensor could be a new feature vector for next tree convolution layers
out(Variable): (Tensor) The feature vector of subtrees. The shape of the output tensor is [max_tree_node_size, output_size, num_filters]. The output tensor could be a new feature vector for next tree convolution layers