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