提交 399f84c0 编写于 作者: T Travis CI

Deploy to GitHub Pages: b6e67f6c

上级 97c5da94
...@@ -698,21 +698,34 @@ details.</li> ...@@ -698,21 +698,34 @@ details.</li>
<dl class="class"> <dl class="class">
<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><blockquote>
<div><p>Image pooling Layer.</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> <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>
<div class="math"> <div class="math">
\[w = 1 + int(ceil(input\_width + 2 * padding - pool\_size) / float(stride)) \[w = 1 +\]</div>
h = 1 + int(ceil(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride\_y))\]</div> </div></blockquote>
<ul class="simple"> <dl class="docutils">
<dt>rac{ceil(input_width + 2 * padding - pool_size)}{stride} \</dt>
<dd>h = 1 +</dd>
</dl>
<p>rac{ceil(input_height + 2 * padding_y - pool_size_y)}{stride_y}</p>
<blockquote>
<div><ul class="simple">
<li>ceil_mode=False:</li> <li>ceil_mode=False:</li>
</ul> </ul>
<div class="math"> <div class="math">
\[w = 1 + int(floor(input\_width + 2 * padding - pool\_size) / float(stride)) \[w = 1 +\]</div>
h = 1 + int(floor(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride\_y))\]</div> </div></blockquote>
<p>The example usage is:</p> <dl class="docutils">
<dt>rac{floor(input_width + 2 * padding - pool_size)}{stride} \</dt>
<dd>h = 1 +</dd>
</dl>
<p>rac{floor(input_height + 2 * padding_y - pool_size_y)}{stride_y}</p>
<blockquote>
<div><p>The example usage is:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">maxpool</span> <span class="o">=</span> <span class="n">img_pool</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">conv</span><span class="p">,</span> <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">maxpool</span> <span class="o">=</span> <span class="n">img_pool</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">conv</span><span class="p">,</span>
<span class="n">pool_size</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">pool_size</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span>
<span class="n">pool_size_y</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">pool_size_y</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span>
...@@ -728,43 +741,87 @@ h = 1 + int(floor(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride ...@@ -728,43 +741,87 @@ h = 1 + int(floor(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride
<col class="field-name" /> <col class="field-name" />
<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">param padding:</th><td class="field-body">The padding size on the x axis. 0 is the default padding size.</td>
<li><strong>padding</strong> (<em>int</em>) &#8211; The padding size on the x axis. 0 is the default padding size.</li> </tr>
<li><strong>padding_y</strong> &#8211; The padding size on the y axis. If the parameter is not set <tr class="field-even field"><th class="field-name">type padding:</th><td class="field-body">int</td>
or set to None, it will be set to &#8216;padding&#8217; automatically.</li> </tr>
<li><strong>name</strong> (<em>basestring</em>) &#8211; The name of this layer. It is optional.</li> <tr class="field-odd field"><th class="field-name" colspan="2">param padding_y:</th></tr>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The input of this layer.</li> <tr class="field-odd field"><td>&#160;</td><td class="field-body">The padding size on the y axis. If the parameter is not set
<li><strong>pool_size</strong> (<em>int</em>) &#8211; The pooling window length on the x axis.</li> or set to None, it will be set to &#8216;padding&#8217; automatically.</td>
<li><strong>pool_size_y</strong> (<em>int</em>) &#8211; The pooling window length on the y axis. If the parameter is </tr>
<tr class="field-even field"><th class="field-name">param name:</th><td class="field-body">The name of this layer. It is optional.</td>
</tr>
<tr class="field-odd field"><th class="field-name">type name:</th><td class="field-body">basestring</td>
</tr>
<tr class="field-even field"><th class="field-name">param input:</th><td class="field-body">The input of this layer.</td>
</tr>
<tr class="field-odd field"><th class="field-name">type input:</th><td class="field-body">paddle.v2.config_base.Layer</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param pool_size:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">The pooling window length on the x axis.</td>
</tr>
<tr class="field-odd field"><th class="field-name">type pool_size:</th><td class="field-body">int</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param pool_size_y:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">The pooling window length on the y axis. If the parameter is
not set or set to None, its actual value will be automatically not set or set to None, its actual value will be automatically
set to pool_size.</li> set to pool_size.</td>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; The number of input channels. If the parameter is not set or </tr>
<tr class="field-odd field"><th class="field-name" colspan="2">type pool_size_y:</th></tr>
<tr class="field-odd field"><td>&#160;</td><td class="field-body">int</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param num_channels:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">The number of input channels. If the parameter is not set or
set to None, its actual value will be automatically set to set to None, its actual value will be automatically set to
the channels number of the input.</li> the channels number of the input.</td>
<li><strong>pool_type</strong> (<em>BasePoolingType</em>) &#8211; Pooling type. MaxPooling is the default pooling.</li> </tr>
<li><strong>stride</strong> (<em>int</em>) &#8211; The stride on the x axis. 1 is the default value.</li> <tr class="field-odd field"><th class="field-name" colspan="2">type num_channels:</th></tr>
<li><strong>stride_y</strong> (<em>int</em>) &#8211; The stride on the y axis. If the parameter is not set or set to <tr class="field-odd field"><td>&#160;</td><td class="field-body">int</td>
None, its actual value will be automatically set to &#8216;stride&#8217;.</li> </tr>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; The extra layer attribute. See paddle.v2.attr.ExtraAttribute for <tr class="field-even field"><th class="field-name" colspan="2">param pool_type:</th></tr>
details.</li> <tr class="field-even field"><td>&#160;</td><td class="field-body">Pooling type. MaxPooling is the default pooling.</td>
<li><strong>ceil_mode</strong> (<em>bool</em>) &#8211; Whether to use the ceil function to calculate output height and width. </tr>
<tr class="field-odd field"><th class="field-name">type pool_type:</th><td class="field-body">BasePoolingType</td>
</tr>
<tr class="field-even field"><th class="field-name">param stride:</th><td class="field-body">The stride on the x axis. 1 is the default value.</td>
</tr>
<tr class="field-odd field"><th class="field-name">type stride:</th><td class="field-body">int</td>
</tr>
<tr class="field-even field"><th class="field-name">param stride_y:</th><td class="field-body">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;.</td>
</tr>
<tr class="field-odd field"><th class="field-name">type stride_y:</th><td class="field-body">int</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param layer_attr:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">type layer_attr:</th></tr>
<tr class="field-odd field"><td>&#160;</td><td class="field-body">paddle.v2.attr.ExtraAttribute</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param ceil_mode:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">Whether 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 True is the default. If it is set to False, the floor function will
be used.</li> be used.</td>
<li><strong>exclude_mode</strong> (<em>bool</em>) &#8211; Whether to exclude the padding cells when calculating, but only </tr>
<tr class="field-odd field"><th class="field-name">type ceil_mode:</th><td class="field-body">bool</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param exclude_mode:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">Whether to exclude the padding cells when calculating, but only
work when pool_type is AvgPooling. If None, also exclude the padding work when pool_type is AvgPooling. If None, also exclude the padding
cells. If use cudnn, use CudnnAvgPooling or CudnnAvgInclPadPooling cells. If use cudnn, use CudnnAvgPooling or CudnnAvgInclPadPooling
as pool_type to identify the mode.</li> as pool_type to identify the mode.</td>
</ul>
</td>
</tr> </tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">paddle.v2.config_base.Layer object.</p> <tr class="field-odd field"><th class="field-name" colspan="2">type exclude_mode:</th></tr>
</td> <tr class="field-odd field"><td>&#160;</td><td class="field-body">bool</td>
</tr> </tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">paddle.v2.config_base.Layer</p> <tr class="field-even field"><th class="field-name">return:</th><td class="field-body">paddle.v2.config_base.Layer object.</td>
</td> </tr>
<tr class="field-odd field"><th class="field-name">rtype:</th><td class="field-body">paddle.v2.config_base.Layer</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div></blockquote>
</dd></dl> </dd></dl>
</div> </div>
...@@ -819,7 +876,8 @@ details.</li> ...@@ -819,7 +876,8 @@ details.</li>
<dl class="class"> <dl class="class">
<dt> <dt>
<em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">maxout</code></dt> <em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">maxout</code></dt>
<dd><dl class="docutils"> <dd><blockquote>
<div><dl class="docutils">
<dt>A layer to do max out on convolutional layer output.</dt> <dt>A layer to do max out on convolutional layer output.</dt>
<dd><ul class="first last simple"> <dd><ul class="first last simple">
<li>Input: the output of a convolutional layer.</li> <li>Input: the output of a convolutional layer.</li>
...@@ -838,42 +896,63 @@ http://www.jmlr.org/proceedings/papers/v28/goodfellow13.pdf`_</span></a> ...@@ -838,42 +896,63 @@ http://www.jmlr.org/proceedings/papers/v28/goodfellow13.pdf`_</span></a>
https://arxiv.org/pdf/1312.6082v4.pdf`_</span></a></dd> https://arxiv.org/pdf/1312.6082v4.pdf`_</span></a></dd>
</dl> </dl>
<div class="math"> <div class="math">
\[y_{si+j} = \max_k x_{gsi + sk + j} \[\begin{split}out = \max_k (in[n, k, o_c , s]) \\
g = groups out_{i * s + j} = \max_k in_{ k * o_{c} * s + i * s + j} \\
s = input.size / num_channels s =\end{split}\]</div>
0 \le i &lt; num_channels / groups </div></blockquote>
0 \le j &lt; s <dl class="docutils">
0 \le k &lt; groups\]</div> <dt>rac{input.size}{ num_channels} \</dt>
<dd>o_{c} =</dd>
<dt>rac{num_channels}{groups} \</dt>
<dd><blockquote class="first">
<div>0 le i &lt; o_{c} \
0 le j &lt; s \
0 le k &lt; groups \</div></blockquote>
<p>The simple usage is:</p> <p>The simple usage is:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">maxout</span> <span class="o">=</span> <span class="n">maxout</span><span class="p">(</span><span class="nb">input</span><span class="p">,</span> <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">maxout</span> <span class="o">=</span> <span class="n">maxout</span><span class="p">(</span><span class="nb">input</span><span class="p">,</span>
<span class="n">num_channels</span><span class="o">=</span><span class="mi">128</span><span class="p">,</span> <span class="n">num_channels</span><span class="o">=</span><span class="mi">128</span><span class="p">,</span>
<span class="n">groups</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span> <span class="n">groups</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span>
</pre></div> </pre></div>
</div> </div>
<table class="docutils field-list" frame="void" rules="none"> <table class="last docutils field-list" frame="void" rules="none">
<col class="field-name" /> <col class="field-name" />
<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">param input:</th><td class="field-body">The input of this layer.</td>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The input of this layer.</li> </tr>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; The number of input channels. If the parameter is not set or <tr class="field-even field"><th class="field-name">type input:</th><td class="field-body">paddle.v2.config_base.Layer</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">param num_channels:</th></tr>
<tr class="field-odd field"><td>&#160;</td><td class="field-body">The number of input channels. If the parameter is not set or
set to None, its actual value will be automatically set to set to None, its actual value will be automatically set to
the channels number of the input.</li> the channels number of the input.</td>
<li><strong>groups</strong> (<em>int</em>) &#8211; The group number of input layer.</li>
<li><strong>name</strong> (<em>basestring</em>) &#8211; The name of this layer. It is optional.</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> </tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">paddle.v2.config_base.Layer object.</p> <tr class="field-even field"><th class="field-name" colspan="2">type num_channels:</th></tr>
</td> <tr class="field-even field"><td>&#160;</td><td class="field-body">int</td>
</tr> </tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">paddle.v2.config_base.Layer</p> <tr class="field-odd field"><th class="field-name">param groups:</th><td class="field-body">The group number of input layer.</td>
</td> </tr>
<tr class="field-even field"><th class="field-name">type groups:</th><td class="field-body">int</td>
</tr>
<tr class="field-odd field"><th class="field-name">param name:</th><td class="field-body">The name of this layer. It is optional.</td>
</tr>
<tr class="field-even field"><th class="field-name">type name:</th><td class="field-body">basestring</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">param layer_attr:</th></tr>
<tr class="field-odd field"><td>&#160;</td><td class="field-body">The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">type layer_attr:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">paddle.v2.attr.ExtraAttribute</td>
</tr>
<tr class="field-odd field"><th class="field-name">return:</th><td class="field-body">paddle.v2.config_base.Layer object.</td>
</tr>
<tr class="field-even field"><th class="field-name">rtype:</th><td class="field-body">paddle.v2.config_base.Layer</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</dd>
</dl>
</dd></dl> </dd></dl>
</div> </div>
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
...@@ -699,21 +699,34 @@ details.</li> ...@@ -699,21 +699,34 @@ details.</li>
<dl class="class"> <dl class="class">
<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><blockquote>
<div><p>Image pooling Layer.</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> <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>
<div class="math"> <div class="math">
\[w = 1 + int(ceil(input\_width + 2 * padding - pool\_size) / float(stride)) \[w = 1 +\]</div>
h = 1 + int(ceil(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride\_y))\]</div> </div></blockquote>
<ul class="simple"> <dl class="docutils">
<dt>rac{ceil(input_width + 2 * padding - pool_size)}{stride} \</dt>
<dd>h = 1 +</dd>
</dl>
<p>rac{ceil(input_height + 2 * padding_y - pool_size_y)}{stride_y}</p>
<blockquote>
<div><ul class="simple">
<li>ceil_mode=False:</li> <li>ceil_mode=False:</li>
</ul> </ul>
<div class="math"> <div class="math">
\[w = 1 + int(floor(input\_width + 2 * padding - pool\_size) / float(stride)) \[w = 1 +\]</div>
h = 1 + int(floor(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride\_y))\]</div> </div></blockquote>
<p>The example usage is:</p> <dl class="docutils">
<dt>rac{floor(input_width + 2 * padding - pool_size)}{stride} \</dt>
<dd>h = 1 +</dd>
</dl>
<p>rac{floor(input_height + 2 * padding_y - pool_size_y)}{stride_y}</p>
<blockquote>
<div><p>The example usage is:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">maxpool</span> <span class="o">=</span> <span class="n">img_pool</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">conv</span><span class="p">,</span> <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">maxpool</span> <span class="o">=</span> <span class="n">img_pool</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">conv</span><span class="p">,</span>
<span class="n">pool_size</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">pool_size</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span>
<span class="n">pool_size_y</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">pool_size_y</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span>
...@@ -729,43 +742,87 @@ h = 1 + int(floor(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride ...@@ -729,43 +742,87 @@ h = 1 + int(floor(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride
<col class="field-name" /> <col class="field-name" />
<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">param padding:</th><td class="field-body">The padding size on the x axis. 0 is the default padding size.</td>
<li><strong>padding</strong> (<em>int</em>) &#8211; The padding size on the x axis. 0 is the default padding size.</li> </tr>
<li><strong>padding_y</strong> &#8211; The padding size on the y axis. If the parameter is not set <tr class="field-even field"><th class="field-name">type padding:</th><td class="field-body">int</td>
or set to None, it will be set to &#8216;padding&#8217; automatically.</li> </tr>
<li><strong>name</strong> (<em>basestring</em>) &#8211; The name of this layer. It is optional.</li> <tr class="field-odd field"><th class="field-name" colspan="2">param padding_y:</th></tr>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The input of this layer.</li> <tr class="field-odd field"><td>&#160;</td><td class="field-body">The padding size on the y axis. If the parameter is not set
<li><strong>pool_size</strong> (<em>int</em>) &#8211; The pooling window length on the x axis.</li> or set to None, it will be set to &#8216;padding&#8217; automatically.</td>
<li><strong>pool_size_y</strong> (<em>int</em>) &#8211; The pooling window length on the y axis. If the parameter is </tr>
<tr class="field-even field"><th class="field-name">param name:</th><td class="field-body">The name of this layer. It is optional.</td>
</tr>
<tr class="field-odd field"><th class="field-name">type name:</th><td class="field-body">basestring</td>
</tr>
<tr class="field-even field"><th class="field-name">param input:</th><td class="field-body">The input of this layer.</td>
</tr>
<tr class="field-odd field"><th class="field-name">type input:</th><td class="field-body">paddle.v2.config_base.Layer</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param pool_size:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">The pooling window length on the x axis.</td>
</tr>
<tr class="field-odd field"><th class="field-name">type pool_size:</th><td class="field-body">int</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param pool_size_y:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">The pooling window length on the y axis. If the parameter is
not set or set to None, its actual value will be automatically not set or set to None, its actual value will be automatically
set to pool_size.</li> set to pool_size.</td>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; The number of input channels. If the parameter is not set or </tr>
<tr class="field-odd field"><th class="field-name" colspan="2">type pool_size_y:</th></tr>
<tr class="field-odd field"><td>&#160;</td><td class="field-body">int</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param num_channels:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">The number of input channels. If the parameter is not set or
set to None, its actual value will be automatically set to set to None, its actual value will be automatically set to
the channels number of the input.</li> the channels number of the input.</td>
<li><strong>pool_type</strong> (<em>BasePoolingType</em>) &#8211; Pooling type. MaxPooling is the default pooling.</li> </tr>
<li><strong>stride</strong> (<em>int</em>) &#8211; The stride on the x axis. 1 is the default value.</li> <tr class="field-odd field"><th class="field-name" colspan="2">type num_channels:</th></tr>
<li><strong>stride_y</strong> (<em>int</em>) &#8211; The stride on the y axis. If the parameter is not set or set to <tr class="field-odd field"><td>&#160;</td><td class="field-body">int</td>
None, its actual value will be automatically set to &#8216;stride&#8217;.</li> </tr>
<li><strong>layer_attr</strong> (<em>paddle.v2.attr.ExtraAttribute</em>) &#8211; The extra layer attribute. See paddle.v2.attr.ExtraAttribute for <tr class="field-even field"><th class="field-name" colspan="2">param pool_type:</th></tr>
details.</li> <tr class="field-even field"><td>&#160;</td><td class="field-body">Pooling type. MaxPooling is the default pooling.</td>
<li><strong>ceil_mode</strong> (<em>bool</em>) &#8211; Whether to use the ceil function to calculate output height and width. </tr>
<tr class="field-odd field"><th class="field-name">type pool_type:</th><td class="field-body">BasePoolingType</td>
</tr>
<tr class="field-even field"><th class="field-name">param stride:</th><td class="field-body">The stride on the x axis. 1 is the default value.</td>
</tr>
<tr class="field-odd field"><th class="field-name">type stride:</th><td class="field-body">int</td>
</tr>
<tr class="field-even field"><th class="field-name">param stride_y:</th><td class="field-body">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;.</td>
</tr>
<tr class="field-odd field"><th class="field-name">type stride_y:</th><td class="field-body">int</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param layer_attr:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">type layer_attr:</th></tr>
<tr class="field-odd field"><td>&#160;</td><td class="field-body">paddle.v2.attr.ExtraAttribute</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param ceil_mode:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">Whether 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 True is the default. If it is set to False, the floor function will
be used.</li> be used.</td>
<li><strong>exclude_mode</strong> (<em>bool</em>) &#8211; Whether to exclude the padding cells when calculating, but only </tr>
<tr class="field-odd field"><th class="field-name">type ceil_mode:</th><td class="field-body">bool</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">param exclude_mode:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">Whether to exclude the padding cells when calculating, but only
work when pool_type is AvgPooling. If None, also exclude the padding work when pool_type is AvgPooling. If None, also exclude the padding
cells. If use cudnn, use CudnnAvgPooling or CudnnAvgInclPadPooling cells. If use cudnn, use CudnnAvgPooling or CudnnAvgInclPadPooling
as pool_type to identify the mode.</li> as pool_type to identify the mode.</td>
</ul>
</td>
</tr> </tr>
<tr class="field-even field"><th class="field-name">返回:</th><td class="field-body"><p class="first">paddle.v2.config_base.Layer object.</p> <tr class="field-odd field"><th class="field-name" colspan="2">type exclude_mode:</th></tr>
</td> <tr class="field-odd field"><td>&#160;</td><td class="field-body">bool</td>
</tr> </tr>
<tr class="field-odd field"><th class="field-name">返回类型:</th><td class="field-body"><p class="first last">paddle.v2.config_base.Layer</p> <tr class="field-even field"><th class="field-name">return:</th><td class="field-body">paddle.v2.config_base.Layer object.</td>
</td> </tr>
<tr class="field-odd field"><th class="field-name">rtype:</th><td class="field-body">paddle.v2.config_base.Layer</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div></blockquote>
</dd></dl> </dd></dl>
</div> </div>
...@@ -820,7 +877,8 @@ details.</li> ...@@ -820,7 +877,8 @@ details.</li>
<dl class="class"> <dl class="class">
<dt> <dt>
<em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">maxout</code></dt> <em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">maxout</code></dt>
<dd><dl class="docutils"> <dd><blockquote>
<div><dl class="docutils">
<dt>A layer to do max out on convolutional layer output.</dt> <dt>A layer to do max out on convolutional layer output.</dt>
<dd><ul class="first last simple"> <dd><ul class="first last simple">
<li>Input: the output of a convolutional layer.</li> <li>Input: the output of a convolutional layer.</li>
...@@ -839,42 +897,63 @@ http://www.jmlr.org/proceedings/papers/v28/goodfellow13.pdf`_</span></a> ...@@ -839,42 +897,63 @@ http://www.jmlr.org/proceedings/papers/v28/goodfellow13.pdf`_</span></a>
https://arxiv.org/pdf/1312.6082v4.pdf`_</span></a></dd> https://arxiv.org/pdf/1312.6082v4.pdf`_</span></a></dd>
</dl> </dl>
<div class="math"> <div class="math">
\[y_{si+j} = \max_k x_{gsi + sk + j} \[\begin{split}out = \max_k (in[n, k, o_c , s]) \\
g = groups out_{i * s + j} = \max_k in_{ k * o_{c} * s + i * s + j} \\
s = input.size / num_channels s =\end{split}\]</div>
0 \le i &lt; num_channels / groups </div></blockquote>
0 \le j &lt; s <dl class="docutils">
0 \le k &lt; groups\]</div> <dt>rac{input.size}{ num_channels} \</dt>
<dd>o_{c} =</dd>
<dt>rac{num_channels}{groups} \</dt>
<dd><blockquote class="first">
<div>0 le i &lt; o_{c} \
0 le j &lt; s \
0 le k &lt; groups \</div></blockquote>
<p>The simple usage is:</p> <p>The simple usage is:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">maxout</span> <span class="o">=</span> <span class="n">maxout</span><span class="p">(</span><span class="nb">input</span><span class="p">,</span> <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">maxout</span> <span class="o">=</span> <span class="n">maxout</span><span class="p">(</span><span class="nb">input</span><span class="p">,</span>
<span class="n">num_channels</span><span class="o">=</span><span class="mi">128</span><span class="p">,</span> <span class="n">num_channels</span><span class="o">=</span><span class="mi">128</span><span class="p">,</span>
<span class="n">groups</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span> <span class="n">groups</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span>
</pre></div> </pre></div>
</div> </div>
<table class="docutils field-list" frame="void" rules="none"> <table class="last docutils field-list" frame="void" rules="none">
<col class="field-name" /> <col class="field-name" />
<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">param input:</th><td class="field-body">The input of this layer.</td>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The input of this layer.</li> </tr>
<li><strong>num_channels</strong> (<em>int</em>) &#8211; The number of input channels. If the parameter is not set or <tr class="field-even field"><th class="field-name">type input:</th><td class="field-body">paddle.v2.config_base.Layer</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">param num_channels:</th></tr>
<tr class="field-odd field"><td>&#160;</td><td class="field-body">The number of input channels. If the parameter is not set or
set to None, its actual value will be automatically set to set to None, its actual value will be automatically set to
the channels number of the input.</li> the channels number of the input.</td>
<li><strong>groups</strong> (<em>int</em>) &#8211; The group number of input layer.</li>
<li><strong>name</strong> (<em>basestring</em>) &#8211; The name of this layer. It is optional.</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> </tr>
<tr class="field-even field"><th class="field-name">返回:</th><td class="field-body"><p class="first">paddle.v2.config_base.Layer object.</p> <tr class="field-even field"><th class="field-name" colspan="2">type num_channels:</th></tr>
</td> <tr class="field-even field"><td>&#160;</td><td class="field-body">int</td>
</tr> </tr>
<tr class="field-odd field"><th class="field-name">返回类型:</th><td class="field-body"><p class="first last">paddle.v2.config_base.Layer</p> <tr class="field-odd field"><th class="field-name">param groups:</th><td class="field-body">The group number of input layer.</td>
</td> </tr>
<tr class="field-even field"><th class="field-name">type groups:</th><td class="field-body">int</td>
</tr>
<tr class="field-odd field"><th class="field-name">param name:</th><td class="field-body">The name of this layer. It is optional.</td>
</tr>
<tr class="field-even field"><th class="field-name">type name:</th><td class="field-body">basestring</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">param layer_attr:</th></tr>
<tr class="field-odd field"><td>&#160;</td><td class="field-body">The extra layer attribute. See paddle.v2.attr.ExtraAttribute for
details.</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">type layer_attr:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">paddle.v2.attr.ExtraAttribute</td>
</tr>
<tr class="field-odd field"><th class="field-name">return:</th><td class="field-body">paddle.v2.config_base.Layer object.</td>
</tr>
<tr class="field-even field"><th class="field-name">rtype:</th><td class="field-body">paddle.v2.config_base.Layer</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</dd>
</dl>
</dd></dl> </dd></dl>
</div> </div>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册