提交 3797ea76 编写于 作者: T Travis CI

Deploy to GitHub Pages: 51c75a93

上级 92e7cba7
......@@ -392,7 +392,7 @@ 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>
on the y axis when filter_size_y is not provided.</li>
<li><strong>filter_size_y</strong> (<em>int</em>) &#8211; 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>) &#8211; The number of filters.</li>
......@@ -498,12 +498,12 @@ what-are-deconvolutional-layers/&gt;`_ .
The num_channel means input image&#8217;s channel number. It may be 1 or 3 when
input is raw pixels of image(mono or RGB), or it may be the previous layer&#8217;s
num_filters * num_group.</p>
<p>There are several group of filter in PaddlePaddle implementation.
Each group will process some channel of the inputs. For example, if an input
<p>There are several groups of filters in PaddlePaddle implementation.
Each group will process some channels of the input. For example, if
num_channel = 256, group = 4, num_filter=32, the PaddlePaddle will create
32*4 = 128 filters to process inputs. The channels will be split into 4
pieces. First 256/4 = 64 channels will process by first 32 filters. The
rest channels will be processed by rest group of filters.</p>
32*4 = 128 filters to process the input. The channels will be split into 4
pieces. First 256/4 = 64 channels will be processed by first 32 filters. The
rest channels will be processed by the rest groups of filters.</p>
<p>The example usage is:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">conv</span> <span class="o">=</span> <span class="n">img_conv</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="n">filter_size</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">filter_size_y</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
<span class="n">num_channels</span><span class="o">=</span><span class="mi">8</span><span class="p">,</span>
......@@ -519,36 +519,51 @@ rest channels will be processed by rest group of filters.</p>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> (<em>basestring</em>) &#8211; The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The input of this layer.</li>
<li><strong>filter_size</strong> (<em>int | tuple | list</em>) &#8211; The x dimension of a filter kernel. Or input a tuple for
two image dimension.</li>
<li><strong>filter_size_y</strong> (<em>int | None</em>) &#8211; The y dimension of a filter kernel. Since PaddlePaddle
currently supports rectangular filters, the filter&#8217;s
shape will be (filter_size, filter_size_y).</li>
<li><strong>filter_size</strong> (<em>int | tuple | list</em>) &#8211; 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_y is not provided.</li>
<li><strong>filter_size_y</strong> (<em>int</em>) &#8211; 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> &#8211; Each filter group&#8217;s number of filter</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) &#8211; Activation type. paddle.v2.activation.Relu is the default activation.</li>
<li><strong>groups</strong> (<em>int</em>) &#8211; Group size of filters.</li>
<li><strong>stride</strong> (<em>int | tuple | list</em>) &#8211; The x dimension of the stride. Or input a tuple for two image
dimension.</li>
<li><strong>stride_y</strong> (<em>int</em>) &#8211; The y dimension of the stride.</li>
<li><strong>padding</strong> (<em>int | tuple | list</em>) &#8211; The x dimension of the padding. Or input a tuple for two
image dimension</li>
<li><strong>padding_y</strong> (<em>int</em>) &#8211; The y dimension of the padding.</li>
<li><strong>dilation</strong> (<em>int | tuple | list</em>) &#8211; The x dimension of the dilation. Or input a tuple for two
image dimension</li>
<li><strong>dilation_y</strong> (<em>int</em>) &#8211; The y dimension of the dilation.</li>
<li><strong>groups</strong> (<em>int</em>) &#8211; The group number. 1 is the default group number.</li>
<li><strong>stride</strong> (<em>int | tuple | list</em>) &#8211; 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. 1 is the default value.</li>
<li><strong>stride_y</strong> (<em>int</em>) &#8211; The stride on the y axis.</li>
<li><strong>padding</strong> (<em>int | tuple | list</em>) &#8211; 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. 0 is the default padding size.</li>
<li><strong>padding_y</strong> (<em>int</em>) &#8211; The padding size on the y axis.</li>
<li><strong>dilation</strong> (<em>int | tuple | list</em>) &#8211; The dimensions of the dilation. If the parameter is set to one integer,
the two dimensions on x and y axises will be same when dilation_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 dilation_y is not provided. 1 is the default dimension.</li>
<li><strong>dilation_y</strong> (<em>int</em>) &#8211; The dimension of the dilation on the y axis.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) &#8211; 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>num_channels</strong> (<em>int</em>) &#8211; number of input channels. If None will be set
automatically from previous output.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) &#8211; Convolution param attribute. None means default attribute</li>
<li><strong>shared_biases</strong> (<em>bool</em>) &#8211; Is biases will be shared between filters or not.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; Layer Extra Attribute.</li>
<li><strong>trans</strong> (<em>bool</em>) &#8211; true if it is a convTransLayer, false if it is a convLayer</li>
<li><strong>layer_type</strong> (<em>String</em>) &#8211; specify the layer_type, default is None. If trans=True,
layer_type has to be &#8220;exconvt&#8221; or &#8220;cudnn_convt&#8221;,
otherwise layer_type has to be either &#8220;exconv&#8221; or
&#8220;cudnn_conv&#8221;</li>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; The number of input channels. If the parameter is not set or
set to None, its actual value will be automatically set to
the channel number of the input.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) &#8211; The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>shared_biases</strong> (<em>bool</em>) &#8211; Whether biases will be shared between filters or not.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; The extra layer attributes. See paddle.v2.attr.ExtraAttribute for
details.</li>
<li><strong>trans</strong> (<em>bool</em>) &#8211; True if it is a convTransLayer, False if it is a convLayer</li>
<li><strong>layer_type</strong> (<em>basestring</em>) &#8211; Specify the layer type. If the dilation&#8217;s dimension on one axis is
larger than 1, layer_type has to be &#8220;cudnn_conv&#8221; or &#8220;cudnn_convt&#8221;.
If trans=True, layer_type has to be &#8220;exconvt&#8221; or &#8220;cudnn_convt&#8221;,
otherwise layer_type has to be either &#8220;exconv&#8221; or &#8220;cudnn_conv&#8221;.</li>
</ul>
</td>
</tr>
......@@ -669,7 +684,7 @@ details.</li>
<dt>
<em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">img_pool</code></dt>
<dd><p>Image pooling Layer.</p>
<p>The details of pooling layer, please refer ufldl&#8217;s <a class="reference external" href="http://ufldl.stanford.edu/tutorial/supervised/Pooling/">pooling</a> .</p>
<p>The details of pooling layer, please refer to ufldl&#8217;s <a class="reference external" href="http://ufldl.stanford.edu/tutorial/supervised/Pooling/">pooling</a> .</p>
<ul class="simple">
<li>ceil_mode=True:</li>
</ul>
......@@ -699,20 +714,27 @@ h = 1 + int(floor(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>padding</strong> (<em>int</em>) &#8211; pooling padding width.</li>
<li><strong>padding_y</strong> (<em>int | None</em>) &#8211; pooling padding height. It&#8217;s equal to padding by default.</li>
<li><strong>name</strong> (<em>basestring.</em>) &#8211; name of pooling layer</li>
<li><strong>padding</strong> (<em>int</em>) &#8211; The padding size on the x axis. 0 is the default padding size.</li>
<li><strong>padding_y</strong> &#8211; The padding size on the y axis. If the parameter is not set
or set to None, it will be set to &#8216;padding&#8217; automatically.</li>
<li><strong>name</strong> (<em>basestring</em>) &#8211; The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The input of this layer.</li>
<li><strong>pool_size</strong> (<em>int</em>) &#8211; pooling window width</li>
<li><strong>pool_size_y</strong> (<em>int | None</em>) &#8211; pooling window height. It&#8217;s eaqual to pool_size by default.</li>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; number of input channel.</li>
<li><strong>pool_type</strong> (<em>BasePoolingType</em>) &#8211; pooling type. MaxPooling or AvgPooling. Default is
MaxPooling.</li>
<li><strong>stride</strong> (<em>int</em>) &#8211; stride width of pooling.</li>
<li><strong>stride_y</strong> (<em>int | None</em>) &#8211; stride height of pooling. It is equal to stride by default.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; Extra Layer attribute.</li>
<li><strong>ceil_mode</strong> (<em>bool</em>) &#8211; Wether to use ceil mode to calculate output height and with.
Defalut is True. If set false, Otherwise use floor.</li>
<li><strong>pool_size</strong> (<em>int</em>) &#8211; The pooling window length on the x axis.</li>
<li><strong>pool_size_y</strong> (<em>int</em>) &#8211; The pooling window length on the y axis. If the parameter is
not set or set to None, its actual value will be automatically
set to pool_size.</li>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; 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>pool_type</strong> (<em>BasePoolingType</em>) &#8211; Pooling type. MaxPooling is the default pooling.</li>
<li><strong>stride</strong> (<em>int</em>) &#8211; The stride on the x axis. 1 is the default value.</li>
<li><strong>stride_y</strong> (<em>int</em>) &#8211; The stride on the y axis. If the parameter is not set or set to
None, its actual value will be automatically set to &#8216;stride&#8217;.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
<li><strong>ceil_mode</strong> (<em>bool</em>) &#8211; Wether to use the ceil function to calculate output height and width.
True is the default. If it is set to False, the floor function will
be used.</li>
</ul>
</td>
</tr>
......@@ -732,9 +754,12 @@ Defalut is True. If set false, Otherwise use floor.</li>
<dl class="class">
<dt>
<em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">spp</code></dt>
<dd><p>Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition.
The details please refer to
<a class="reference external" href="https://arxiv.org/abs/1406.4729">Kaiming He&#8217;s paper</a>.</p>
<dd><p>A layer performs spatial pyramid pooling.</p>
<dl class="docutils">
<dt>Reference:</dt>
<dd>Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition
<a class="reference external" href="https://arxiv.org/abs/1406.4729">https://arxiv.org/abs/1406.4729</a></dd>
</dl>
<p>The example usage is:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">spp</span> <span class="o">=</span> <span class="n">spp</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">data</span><span class="p">,</span>
<span class="n">pyramid_height</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>
......@@ -749,10 +774,13 @@ The details please refer to
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> (<em>basestring</em>) &#8211; The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The input of this layer.</li>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; number of input channel.</li>
<li><strong>pool_type</strong> &#8211; Pooling type. MaxPooling or AveragePooling. Default is MaxPooling.</li>
<li><strong>pyramid_height</strong> (<em>int</em>) &#8211; pyramid height.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; Extra Layer Attribute.</li>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; 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>pool_type</strong> &#8211; Pooling type. MaxPooling is the default pooling.</li>
<li><strong>pyramid_height</strong> (<em>int</em>) &#8211; The pyramid height of this pooling.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -406,7 +406,7 @@ 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>
on the y axis when filter_size_y is not provided.</li>
<li><strong>filter_size_y</strong> (<em>int</em>) &#8211; 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>) &#8211; The number of filters.</li>
......@@ -512,12 +512,12 @@ what-are-deconvolutional-layers/&gt;`_ .
The num_channel means input image&#8217;s channel number. It may be 1 or 3 when
input is raw pixels of image(mono or RGB), or it may be the previous layer&#8217;s
num_filters * num_group.</p>
<p>There are several group of filter in PaddlePaddle implementation.
Each group will process some channel of the inputs. For example, if an input
<p>There are several groups of filters in PaddlePaddle implementation.
Each group will process some channels of the input. For example, if
num_channel = 256, group = 4, num_filter=32, the PaddlePaddle will create
32*4 = 128 filters to process inputs. The channels will be split into 4
pieces. First 256/4 = 64 channels will process by first 32 filters. The
rest channels will be processed by rest group of filters.</p>
32*4 = 128 filters to process the input. The channels will be split into 4
pieces. First 256/4 = 64 channels will be processed by first 32 filters. The
rest channels will be processed by the rest groups of filters.</p>
<p>The example usage is:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">conv</span> <span class="o">=</span> <span class="n">img_conv</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="n">filter_size</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">filter_size_y</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
<span class="n">num_channels</span><span class="o">=</span><span class="mi">8</span><span class="p">,</span>
......@@ -533,36 +533,51 @@ rest channels will be processed by rest group of filters.</p>
<tr class="field-odd field"><th class="field-name">参数:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> (<em>basestring</em>) &#8211; The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The input of this layer.</li>
<li><strong>filter_size</strong> (<em>int | tuple | list</em>) &#8211; The x dimension of a filter kernel. Or input a tuple for
two image dimension.</li>
<li><strong>filter_size_y</strong> (<em>int | None</em>) &#8211; The y dimension of a filter kernel. Since PaddlePaddle
currently supports rectangular filters, the filter&#8217;s
shape will be (filter_size, filter_size_y).</li>
<li><strong>filter_size</strong> (<em>int | tuple | list</em>) &#8211; 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_y is not provided.</li>
<li><strong>filter_size_y</strong> (<em>int</em>) &#8211; 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> &#8211; Each filter group&#8217;s number of filter</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base</em>) &#8211; Activation type. paddle.v2.activation.Relu is the default activation.</li>
<li><strong>groups</strong> (<em>int</em>) &#8211; Group size of filters.</li>
<li><strong>stride</strong> (<em>int | tuple | list</em>) &#8211; The x dimension of the stride. Or input a tuple for two image
dimension.</li>
<li><strong>stride_y</strong> (<em>int</em>) &#8211; The y dimension of the stride.</li>
<li><strong>padding</strong> (<em>int | tuple | list</em>) &#8211; The x dimension of the padding. Or input a tuple for two
image dimension</li>
<li><strong>padding_y</strong> (<em>int</em>) &#8211; The y dimension of the padding.</li>
<li><strong>dilation</strong> (<em>int | tuple | list</em>) &#8211; The x dimension of the dilation. Or input a tuple for two
image dimension</li>
<li><strong>dilation_y</strong> (<em>int</em>) &#8211; The y dimension of the dilation.</li>
<li><strong>groups</strong> (<em>int</em>) &#8211; The group number. 1 is the default group number.</li>
<li><strong>stride</strong> (<em>int | tuple | list</em>) &#8211; 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. 1 is the default value.</li>
<li><strong>stride_y</strong> (<em>int</em>) &#8211; The stride on the y axis.</li>
<li><strong>padding</strong> (<em>int | tuple | list</em>) &#8211; 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. 0 is the default padding size.</li>
<li><strong>padding_y</strong> (<em>int</em>) &#8211; The padding size on the y axis.</li>
<li><strong>dilation</strong> (<em>int | tuple | list</em>) &#8211; The dimensions of the dilation. If the parameter is set to one integer,
the two dimensions on x and y axises will be same when dilation_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 dilation_y is not provided. 1 is the default dimension.</li>
<li><strong>dilation_y</strong> (<em>int</em>) &#8211; The dimension of the dilation on the y axis.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) &#8211; 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>num_channels</strong> (<em>int</em>) &#8211; number of input channels. If None will be set
automatically from previous output.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) &#8211; Convolution param attribute. None means default attribute</li>
<li><strong>shared_biases</strong> (<em>bool</em>) &#8211; Is biases will be shared between filters or not.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; Layer Extra Attribute.</li>
<li><strong>trans</strong> (<em>bool</em>) &#8211; true if it is a convTransLayer, false if it is a convLayer</li>
<li><strong>layer_type</strong> (<em>String</em>) &#8211; specify the layer_type, default is None. If trans=True,
layer_type has to be &#8220;exconvt&#8221; or &#8220;cudnn_convt&#8221;,
otherwise layer_type has to be either &#8220;exconv&#8221; or
&#8220;cudnn_conv&#8221;</li>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; The number of input channels. If the parameter is not set or
set to None, its actual value will be automatically set to
the channel number of the input.</li>
<li><strong>param_attr</strong> (<em>paddle.v2.attr.ParameterAttribute</em>) &#8211; The parameter attribute. See paddle.v2.attr.ParameterAttribute for
details.</li>
<li><strong>shared_biases</strong> (<em>bool</em>) &#8211; Whether biases will be shared between filters or not.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; The extra layer attributes. See paddle.v2.attr.ExtraAttribute for
details.</li>
<li><strong>trans</strong> (<em>bool</em>) &#8211; True if it is a convTransLayer, False if it is a convLayer</li>
<li><strong>layer_type</strong> (<em>basestring</em>) &#8211; Specify the layer type. If the dilation&#8217;s dimension on one axis is
larger than 1, layer_type has to be &#8220;cudnn_conv&#8221; or &#8220;cudnn_convt&#8221;.
If trans=True, layer_type has to be &#8220;exconvt&#8221; or &#8220;cudnn_convt&#8221;,
otherwise layer_type has to be either &#8220;exconv&#8221; or &#8220;cudnn_conv&#8221;.</li>
</ul>
</td>
</tr>
......@@ -683,7 +698,7 @@ details.</li>
<dt>
<em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">img_pool</code></dt>
<dd><p>Image pooling Layer.</p>
<p>The details of pooling layer, please refer ufldl&#8217;s <a class="reference external" href="http://ufldl.stanford.edu/tutorial/supervised/Pooling/">pooling</a> .</p>
<p>The details of pooling layer, please refer to ufldl&#8217;s <a class="reference external" href="http://ufldl.stanford.edu/tutorial/supervised/Pooling/">pooling</a> .</p>
<ul class="simple">
<li>ceil_mode=True:</li>
</ul>
......@@ -713,20 +728,27 @@ h = 1 + int(floor(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">参数:</th><td class="field-body"><ul class="first simple">
<li><strong>padding</strong> (<em>int</em>) &#8211; pooling padding width.</li>
<li><strong>padding_y</strong> (<em>int | None</em>) &#8211; pooling padding height. It&#8217;s equal to padding by default.</li>
<li><strong>name</strong> (<em>basestring.</em>) &#8211; name of pooling layer</li>
<li><strong>padding</strong> (<em>int</em>) &#8211; The padding size on the x axis. 0 is the default padding size.</li>
<li><strong>padding_y</strong> &#8211; The padding size on the y axis. If the parameter is not set
or set to None, it will be set to &#8216;padding&#8217; automatically.</li>
<li><strong>name</strong> (<em>basestring</em>) &#8211; The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The input of this layer.</li>
<li><strong>pool_size</strong> (<em>int</em>) &#8211; pooling window width</li>
<li><strong>pool_size_y</strong> (<em>int | None</em>) &#8211; pooling window height. It&#8217;s eaqual to pool_size by default.</li>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; number of input channel.</li>
<li><strong>pool_type</strong> (<em>BasePoolingType</em>) &#8211; pooling type. MaxPooling or AvgPooling. Default is
MaxPooling.</li>
<li><strong>stride</strong> (<em>int</em>) &#8211; stride width of pooling.</li>
<li><strong>stride_y</strong> (<em>int | None</em>) &#8211; stride height of pooling. It is equal to stride by default.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; Extra Layer attribute.</li>
<li><strong>ceil_mode</strong> (<em>bool</em>) &#8211; Wether to use ceil mode to calculate output height and with.
Defalut is True. If set false, Otherwise use floor.</li>
<li><strong>pool_size</strong> (<em>int</em>) &#8211; The pooling window length on the x axis.</li>
<li><strong>pool_size_y</strong> (<em>int</em>) &#8211; The pooling window length on the y axis. If the parameter is
not set or set to None, its actual value will be automatically
set to pool_size.</li>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; 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>pool_type</strong> (<em>BasePoolingType</em>) &#8211; Pooling type. MaxPooling is the default pooling.</li>
<li><strong>stride</strong> (<em>int</em>) &#8211; The stride on the x axis. 1 is the default value.</li>
<li><strong>stride_y</strong> (<em>int</em>) &#8211; The stride on the y axis. If the parameter is not set or set to
None, its actual value will be automatically set to &#8216;stride&#8217;.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
<li><strong>ceil_mode</strong> (<em>bool</em>) &#8211; Wether to use the ceil function to calculate output height and width.
True is the default. If it is set to False, the floor function will
be used.</li>
</ul>
</td>
</tr>
......@@ -746,9 +768,12 @@ Defalut is True. If set false, Otherwise use floor.</li>
<dl class="class">
<dt>
<em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">spp</code></dt>
<dd><p>Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition.
The details please refer to
<a class="reference external" href="https://arxiv.org/abs/1406.4729">Kaiming He&#8217;s paper</a>.</p>
<dd><p>A layer performs spatial pyramid pooling.</p>
<dl class="docutils">
<dt>Reference:</dt>
<dd>Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition
<a class="reference external" href="https://arxiv.org/abs/1406.4729">https://arxiv.org/abs/1406.4729</a></dd>
</dl>
<p>The example usage is:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">spp</span> <span class="o">=</span> <span class="n">spp</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">data</span><span class="p">,</span>
<span class="n">pyramid_height</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>
......@@ -763,10 +788,13 @@ The details please refer to
<tr class="field-odd field"><th class="field-name">参数:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> (<em>basestring</em>) &#8211; The name of this layer. It is optional.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The input of this layer.</li>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; number of input channel.</li>
<li><strong>pool_type</strong> &#8211; Pooling type. MaxPooling or AveragePooling. Default is MaxPooling.</li>
<li><strong>pyramid_height</strong> (<em>int</em>) &#8211; pyramid height.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; Extra Layer Attribute.</li>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; 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>pool_type</strong> &#8211; Pooling type. MaxPooling is the default pooling.</li>
<li><strong>pyramid_height</strong> (<em>int</em>) &#8211; The pyramid height of this pooling.</li>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</li>
</ul>
</td>
</tr>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册