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

Deploy to GitHub Pages: b6e67f6c

上级 97c5da94
......@@ -698,21 +698,34 @@ details.</li>
<dl class="class">
<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>
<ul class="simple">
<li>ceil_mode=True:</li>
</ul>
<div class="math">
\[w = 1 + int(ceil(input\_width + 2 * padding - pool\_size) / float(stride))
h = 1 + int(ceil(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride\_y))\]</div>
<ul class="simple">
\[w = 1 +\]</div>
</div></blockquote>
<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>
</ul>
<div class="math">
\[w = 1 + int(floor(input\_width + 2 * padding - pool\_size) / float(stride))
h = 1 + int(floor(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride\_y))\]</div>
<p>The example usage is:</p>
\[w = 1 +\]</div>
</div></blockquote>
<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>
<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>
......@@ -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-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; 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; 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
<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>
</tr>
<tr class="field-even field"><th class="field-name">type padding:</th><td class="field-body">int</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">param padding_y:</th></tr>
<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
or set to None, it will be set to &#8216;padding&#8217; automatically.</td>
</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
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 pool_size.</td>
</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
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; Whether to use the ceil function to calculate output height and width.
the channels number of the input.</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">type num_channels:</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 pool_type:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">Pooling type. MaxPooling is the default pooling.</td>
</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
be used.</li>
<li><strong>exclude_mode</strong> (<em>bool</em>) &#8211; Whether to exclude the padding cells when calculating, but only
be used.</td>
</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
cells. If use cudnn, use CudnnAvgPooling or CudnnAvgInclPadPooling
as pool_type to identify the mode.</li>
</ul>
</td>
as pool_type to identify the mode.</td>
</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>
</td>
<tr class="field-odd field"><th class="field-name" colspan="2">type exclude_mode:</th></tr>
<tr class="field-odd field"><td>&#160;</td><td class="field-body">bool</td>
</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>
</td>
<tr class="field-even field"><th class="field-name">return:</th><td class="field-body">paddle.v2.config_base.Layer object.</td>
</tr>
<tr class="field-odd field"><th class="field-name">rtype:</th><td class="field-body">paddle.v2.config_base.Layer</td>
</tr>
</tbody>
</table>
</div></blockquote>
</dd></dl>
</div>
......@@ -819,7 +876,8 @@ details.</li>
<dl class="class">
<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>
<dd><ul class="first last simple">
<li>Input: the output of a convolutional layer.</li>
......@@ -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>
</dl>
<div class="math">
\[y_{si+j} = \max_k x_{gsi + sk + j}
g = groups
s = input.size / num_channels
0 \le i &lt; num_channels / groups
0 \le j &lt; s
0 \le k &lt; groups\]</div>
\[\begin{split}out = \max_k (in[n, k, o_c , s]) \\
out_{i * s + j} = \max_k in_{ k * o_{c} * s + i * s + j} \\
s =\end{split}\]</div>
</div></blockquote>
<dl class="docutils">
<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>
<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">groups</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span>
</pre></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-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>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; The number of input channels. If the parameter is not set or
<tr class="field-odd field"><th class="field-name">param input:</th><td class="field-body">The input of this layer.</td>
</tr>
<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
the channels number of the input.</li>
<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>
the channels number of the input.</td>
</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>
</td>
<tr class="field-even field"><th class="field-name" colspan="2">type num_channels:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">int</td>
</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>
</td>
<tr class="field-odd field"><th class="field-name">param groups:</th><td class="field-body">The group number of input layer.</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>
</tbody>
</table>
</dd>
</dl>
</dd></dl>
</div>
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -699,21 +699,34 @@ details.</li>
<dl class="class">
<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>
<ul class="simple">
<li>ceil_mode=True:</li>
</ul>
<div class="math">
\[w = 1 + int(ceil(input\_width + 2 * padding - pool\_size) / float(stride))
h = 1 + int(ceil(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride\_y))\]</div>
<ul class="simple">
\[w = 1 +\]</div>
</div></blockquote>
<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>
</ul>
<div class="math">
\[w = 1 + int(floor(input\_width + 2 * padding - pool\_size) / float(stride))
h = 1 + int(floor(input\_height + 2 * padding\_y - pool\_size\_y) / float(stride\_y))\]</div>
<p>The example usage is:</p>
\[w = 1 +\]</div>
</div></blockquote>
<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>
<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>
......@@ -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-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; 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; 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
<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>
</tr>
<tr class="field-even field"><th class="field-name">type padding:</th><td class="field-body">int</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">param padding_y:</th></tr>
<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
or set to None, it will be set to &#8216;padding&#8217; automatically.</td>
</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
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 pool_size.</td>
</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
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; Whether to use the ceil function to calculate output height and width.
the channels number of the input.</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">type num_channels:</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 pool_type:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">Pooling type. MaxPooling is the default pooling.</td>
</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
be used.</li>
<li><strong>exclude_mode</strong> (<em>bool</em>) &#8211; Whether to exclude the padding cells when calculating, but only
be used.</td>
</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
cells. If use cudnn, use CudnnAvgPooling or CudnnAvgInclPadPooling
as pool_type to identify the mode.</li>
</ul>
</td>
as pool_type to identify the mode.</td>
</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>
</td>
<tr class="field-odd field"><th class="field-name" colspan="2">type exclude_mode:</th></tr>
<tr class="field-odd field"><td>&#160;</td><td class="field-body">bool</td>
</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>
</td>
<tr class="field-even field"><th class="field-name">return:</th><td class="field-body">paddle.v2.config_base.Layer object.</td>
</tr>
<tr class="field-odd field"><th class="field-name">rtype:</th><td class="field-body">paddle.v2.config_base.Layer</td>
</tr>
</tbody>
</table>
</div></blockquote>
</dd></dl>
</div>
......@@ -820,7 +877,8 @@ details.</li>
<dl class="class">
<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>
<dd><ul class="first last simple">
<li>Input: the output of a convolutional layer.</li>
......@@ -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>
</dl>
<div class="math">
\[y_{si+j} = \max_k x_{gsi + sk + j}
g = groups
s = input.size / num_channels
0 \le i &lt; num_channels / groups
0 \le j &lt; s
0 \le k &lt; groups\]</div>
\[\begin{split}out = \max_k (in[n, k, o_c , s]) \\
out_{i * s + j} = \max_k in_{ k * o_{c} * s + i * s + j} \\
s =\end{split}\]</div>
</div></blockquote>
<dl class="docutils">
<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>
<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">groups</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span>
</pre></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-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">参数:</th><td class="field-body"><ul class="first simple">
<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; The number of input channels. If the parameter is not set or
<tr class="field-odd field"><th class="field-name">param input:</th><td class="field-body">The input of this layer.</td>
</tr>
<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
the channels number of the input.</li>
<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>
the channels number of the input.</td>
</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>
</td>
<tr class="field-even field"><th class="field-name" colspan="2">type num_channels:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">int</td>
</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>
</td>
<tr class="field-odd field"><th class="field-name">param groups:</th><td class="field-body">The group number of input layer.</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>
</tbody>
</table>
</dd>
</dl>
</dd></dl>
</div>
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册