<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</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</em>) – batch normalization input. Better be linear activation.
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – This layer’s input which is to be performed batch normalization on.</li>
Because there is an activation inside batch_normalization.</li>
<li><strong>batch_norm_type</strong> (<em>None | string</em><em>, </em><em>None</em><em> or </em><em>"batch_norm"</em><em> or </em><em>"cudnn_batch_norm"</em><em>
<li><strong>batch_norm_type</strong> (<em>None | string</em><em>, </em><em>None</em><em> or </em><em>"batch_norm"</em><em> or </em><em>"cudnn_batch_norm"</em><em>
or </em><em>"mkldnn_batch_norm"</em>) – We have batch_norm, mkldnn_batch_norm and cudnn_batch_norm.
or </em><em>"mkldnn_batch_norm"</em>) – We have batch_norm, mkldnn_batch_norm and cudnn_batch_norm.
batch_norm supports CPU, MKLDNN and GPU. cudnn_batch_norm
batch_norm supports CPU, MKLDNN and GPU. cudnn_batch_norm
requires cuDNN version greater or equal to v4 (>=v4).
requires cuDNN version greater or equal to v4 (>=v4).
But cudnn_batch_norm is faster and needs less
But cudnn_batch_norm is faster and needs less
memory than batch_norm. mkldnn_batch_norm requires
memory than batch_norm. mkldnn_batch_norm requires
enable use_mkldnn. By default (None), we will
use_mkldnn is enabled. By default (None), we will
automaticly select cudnn_batch_norm for GPU,
automatically select cudnn_batch_norm for GPU,
mkldnn_batch_norm for MKLDNN and batch_norm for CPU.
mkldnn_batch_norm for MKLDNN and batch_norm for CPU.
Otherwise, select batch norm type based on the
Users can specify the batch norm type. If you use
specified type. If you use cudnn_batch_norm,
cudnn_batch_norm, we suggested you use latest version,
we suggested you use latest version, such as v5.1.</li>
such as v5.1.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. Better be relu. Because batch
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Relu is the default activation.</li>
normalization will normalize input near zero.</li>
<li><strong>num_channels</strong> (<em>int</em>) – The number of input channels. If the parameter is not set or
<li><strong>num_channels</strong> (<em>int</em>) – num of image channels or previous layer’s number of
set to None, its actual value will be automatically set to
filters. None will automatically get from layer’s
the channels number of the input.</li>
input.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) –<spanclass="math">\(\beta\)</span>. The bias attribute. If the parameter is set to
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) –<spanclass="math">\(\beta\)</span>, better be zero when initialize. So the
False or an object whose type is not paddle.v2.attr.ParameterAttribute, no
initial_std=0, initial_mean=1 is best practice.</li>
bias is defined. If the parameter is set to True, the bias is
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) –<spanclass="math">\(\gamma\)</span>, better be one when initialize. So the
initialized to zero.</li>
initial_std=0, initial_mean=1 is best practice.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) –<spanclass="math">\(\gamma\)</span>. The parameter attribute. See paddle.v2.attr.ParameterAttribute
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – Extra Layer Attribute.</li>
for details.</li>
<li><strong>use_global_stats</strong> (<em>bool | None.</em>) – whether use moving mean/variance statistics
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
during testing peroid. If None or True,
details.</li>
it will use moving mean/variance statistics during
<li><strong>use_global_stats</strong> (<em>bool | None.</em>) – Whether use moving mean/variance statistics during
testing. If False, it will use the mean
testing peroid. If the parameter is set to None or
and variance of current batch of test data for
True, it will use moving mean/variance statistics
testing.</li>
during testing. If the parameter is set to False, it
<li><strong>moving_average_fraction</strong> (<em>float.</em>) – Factor used in the moving average
will use the mean and variance of the current batch
<li><strong>boot_bias_active_type</strong> (<em>paddle.v2.activation.Base</em>) – boot layer’s active type.</li>
<li><strong>boot_bias</strong> (<em>paddle.v2.attr.ParameterAttribute | None</em>) – The bias attribute of memory’s output at the first time step.
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>boot_bias_active_type</strong> (<em>paddle.v2.activation.Base</em>) – Activation type for memory’s bias at the first time
step. paddle.v2.activation.Linear is the default activation.</li>
<li><strong>boot_with_const_id</strong> (<em>int</em>) – This parameter specifies memory’s output at the first
time step and the output is an index.</li>
</ul>
</ul>
</td>
</td>
</tr>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">paddle.v2.config_base.Layer object which is a memory.</p>
<li><strong>b</strong> (<em>paddle.v2.config_base.Layer</em>) –The second input sequence layer</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default activation.</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>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</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
<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
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>
parameter is set to True, the bias is initialized to zero.</li>
...
@@ -2595,29 +2607,26 @@ and <span class="math">\(f\)</span> is activation function.</p>
...
@@ -2595,29 +2607,26 @@ and <span class="math">\(f\)</span> is activation function.</p>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</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>) –Input layers. It could be a paddle.v2.config_base.Layer or list/tuple of
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple</em>) –The input layers. It could be a paddle.v2.config_base.Layer or list/tuple of
paddle.v2.config_base.Layer.</li>
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 activation.</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
<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
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>
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>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>) – batch normalization input. Better be linear activation.
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) – This layer’s input which is to be performed batch normalization on.</li>
Because there is an activation inside batch_normalization.</li>
<li><strong>batch_norm_type</strong> (<em>None | string</em><em>, </em><em>None</em><em> or </em><em>"batch_norm"</em><em> or </em><em>"cudnn_batch_norm"</em><em>
<li><strong>batch_norm_type</strong> (<em>None | string</em><em>, </em><em>None</em><em> or </em><em>"batch_norm"</em><em> or </em><em>"cudnn_batch_norm"</em><em>
or </em><em>"mkldnn_batch_norm"</em>) – We have batch_norm, mkldnn_batch_norm and cudnn_batch_norm.
or </em><em>"mkldnn_batch_norm"</em>) – We have batch_norm, mkldnn_batch_norm and cudnn_batch_norm.
batch_norm supports CPU, MKLDNN and GPU. cudnn_batch_norm
batch_norm supports CPU, MKLDNN and GPU. cudnn_batch_norm
requires cuDNN version greater or equal to v4 (>=v4).
requires cuDNN version greater or equal to v4 (>=v4).
But cudnn_batch_norm is faster and needs less
But cudnn_batch_norm is faster and needs less
memory than batch_norm. mkldnn_batch_norm requires
memory than batch_norm. mkldnn_batch_norm requires
enable use_mkldnn. By default (None), we will
use_mkldnn is enabled. By default (None), we will
automaticly select cudnn_batch_norm for GPU,
automatically select cudnn_batch_norm for GPU,
mkldnn_batch_norm for MKLDNN and batch_norm for CPU.
mkldnn_batch_norm for MKLDNN and batch_norm for CPU.
Otherwise, select batch norm type based on the
Users can specify the batch norm type. If you use
specified type. If you use cudnn_batch_norm,
cudnn_batch_norm, we suggested you use latest version,
we suggested you use latest version, such as v5.1.</li>
such as v5.1.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation Type. Better be relu. Because batch
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Relu is the default activation.</li>
normalization will normalize input near zero.</li>
<li><strong>num_channels</strong> (<em>int</em>) – The number of input channels. If the parameter is not set or
<li><strong>num_channels</strong> (<em>int</em>) – num of image channels or previous layer’s number of
set to None, its actual value will be automatically set to
filters. None will automatically get from layer’s
the channels number of the input.</li>
input.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) –<spanclass="math">\(\beta\)</span>. The bias attribute. If the parameter is set to
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) –<spanclass="math">\(\beta\)</span>, better be zero when initialize. So the
False or an object whose type is not paddle.v2.attr.ParameterAttribute, no
initial_std=0, initial_mean=1 is best practice.</li>
bias is defined. If the parameter is set to True, the bias is
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) –<spanclass="math">\(\gamma\)</span>, better be one when initialize. So the
initialized to zero.</li>
initial_std=0, initial_mean=1 is best practice.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) –<spanclass="math">\(\gamma\)</span>. The parameter attribute. See paddle.v2.attr.ParameterAttribute
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – Extra Layer Attribute.</li>
for details.</li>
<li><strong>use_global_stats</strong> (<em>bool | None.</em>) – whether use moving mean/variance statistics
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
during testing peroid. If None or True,
details.</li>
it will use moving mean/variance statistics during
<li><strong>use_global_stats</strong> (<em>bool | None.</em>) – Whether use moving mean/variance statistics during
testing. If False, it will use the mean
testing peroid. If the parameter is set to None or
and variance of current batch of test data for
True, it will use moving mean/variance statistics
testing.</li>
during testing. If the parameter is set to False, it
<li><strong>moving_average_fraction</strong> (<em>float.</em>) – Factor used in the moving average
will use the mean and variance of the current batch
<li><strong>boot_bias_active_type</strong> (<em>paddle.v2.activation.Base</em>) – boot layer’s active type.</li>
<li><strong>boot_bias</strong> (<em>paddle.v2.attr.ParameterAttribute | None</em>) – The bias attribute of memory’s output at the first time step.
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>boot_bias_active_type</strong> (<em>paddle.v2.activation.Base</em>) – Activation type for memory’s bias at the first time
step. paddle.v2.activation.Linear is the default activation.</li>
<li><strong>boot_with_const_id</strong> (<em>int</em>) – This parameter specifies memory’s output at the first
time step and the output is an index.</li>
</ul>
</ul>
</td>
</td>
</tr>
</tr>
<trclass="field-even field"><thclass="field-name">返回:</th><tdclass="field-body"><pclass="first">paddle.v2.config_base.Layer object which is a memory.</p>
<li><strong>b</strong> (<em>paddle.v2.config_base.Layer</em>) –The second input sequence layer</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) – Activation type. paddle.v2.activation.Identity is the default activation.</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>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) – The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</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
<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
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>
parameter is set to True, the bias is initialized to zero.</li>
...
@@ -2609,29 +2621,26 @@ and <span class="math">\(f\)</span> is activation function.</p>
...
@@ -2609,29 +2621,26 @@ and <span class="math">\(f\)</span> is activation function.</p>
<li><strong>name</strong> (<em>basestring</em>) – The name of this layer. It is optional.</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>) –Input layers. It could be a paddle.v2.config_base.Layer or list/tuple of
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer | list | tuple</em>) –The input layers. It could be a paddle.v2.config_base.Layer or list/tuple of
paddle.v2.config_base.Layer.</li>
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 activation.</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
<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
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>
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