提交 504eb0ed 编写于 作者: T Travis CI

Deploy to GitHub Pages: 7bf47ea4

上级 00cbb0e3
......@@ -252,6 +252,11 @@ first_seq
.. autoclass:: paddle.v2.layer.first_seq
:noindex:
sub_seq
---------
.. autoclass:: paddle.v2.layer.sub_seq
:noindex:
concat
------
.. autoclass:: paddle.v2.layer.concat
......
......@@ -68,12 +68,6 @@ scale
:noindex:
reshape
---------
.. autofunction:: paddle.v2.fluid.layers.reshape
:noindex:
transpose
---------
.. autofunction:: paddle.v2.fluid.layers.transpose
......
......@@ -2215,6 +2215,46 @@ details.</li>
</table>
</dd></dl>
</div>
<div class="section" id="sub-seq">
<h3>sub_seq<a class="headerlink" href="#sub-seq" title="Permalink to this headline"></a></h3>
<dl class="class">
<dt>
<em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">sub_seq</code></dt>
<dd><p>sub_seq will return sub-sequences from the input sequences. For each
sequence in the input sequence layer, sub_seq will slice it by given
offset and size. Please notice that, number of offset value and size value
both are equal to the number of sequence in the input layer.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">sub_seq</span> <span class="o">=</span> <span class="n">sub_seq</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">input_seq</span><span class="p">,</span> <span class="n">offsets</span><span class="o">=</span><span class="n">offsets</span><span class="p">,</span> <span class="n">sizes</span><span class="o">=</span><span class="n">sizes</span><span class="p">)</span>
</pre></div>
</div>
<table class="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>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, which should be sequence.</li>
<li><strong>offsets</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The offset indices to slice the input sequence, which should
be sequence type.</li>
<li><strong>sizes</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The sizes of the sub-sequences, which should be sequence type.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base.</em>) &#8211; Activation type, paddle.v2.activation.Linear is the default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) &#8211; The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
parameter is set to True, the bias is initialized to zero.</li>
</ul>
</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>
<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>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="concat">
<h3>concat<a class="headerlink" href="#concat" title="Permalink to this headline"></a></h3>
......
......@@ -673,43 +673,6 @@ Duplicable: False Optional: False</li>
</table>
</dd></dl>
</div>
<div class="section" id="id1">
<h2>reshape<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">reshape</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span></dt>
<dd><p>Reshape Operator.</p>
<p>Reshape Input(X) into the shape specified by Attr(shape).</p>
<p>An example:
Given a 2-D tensor X with 2 rows and 2 columns</p>
<blockquote>
<div>[[1, 2], [3, 4]]</div></blockquote>
<p>and target shape = [1, 4], the reshape operator will transform
the tensor X into a 2-D tensor:</p>
<blockquote>
<div>[[1, 2, 3, 4]]</div></blockquote>
<p>One dimension in the target shape can be set -1, representing that its
size is unknown. In this case, the real dimension will be infered from
the original shape of Input(X) and other dimensions in the target shape.</p>
<table class="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>x</strong> &#8211; The input tensor of reshape operator.
Duplicable: False Optional: False</li>
<li><strong>shape</strong> (<em>INTS</em>) &#8211; (vector&lt;int&gt;) Target shape of reshape operator.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The output tensor of reshape operator.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="transpose">
<h2>transpose<a class="headerlink" href="#transpose" title="Permalink to this headline"></a></h2>
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -252,6 +252,11 @@ first_seq
.. autoclass:: paddle.v2.layer.first_seq
:noindex:
sub_seq
---------
.. autoclass:: paddle.v2.layer.sub_seq
:noindex:
concat
------
.. autoclass:: paddle.v2.layer.concat
......
......@@ -68,12 +68,6 @@ scale
:noindex:
reshape
---------
.. autofunction:: paddle.v2.fluid.layers.reshape
:noindex:
transpose
---------
.. autofunction:: paddle.v2.fluid.layers.transpose
......
......@@ -2228,6 +2228,46 @@ details.</li>
</table>
</dd></dl>
</div>
<div class="section" id="sub-seq">
<h3>sub_seq<a class="headerlink" href="#sub-seq" title="永久链接至标题"></a></h3>
<dl class="class">
<dt>
<em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">sub_seq</code></dt>
<dd><p>sub_seq will return sub-sequences from the input sequences. For each
sequence in the input sequence layer, sub_seq will slice it by given
offset and size. Please notice that, number of offset value and size value
both are equal to the number of sequence in the input layer.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">sub_seq</span> <span class="o">=</span> <span class="n">sub_seq</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">input_seq</span><span class="p">,</span> <span class="n">offsets</span><span class="o">=</span><span class="n">offsets</span><span class="p">,</span> <span class="n">sizes</span><span class="o">=</span><span class="n">sizes</span><span class="p">)</span>
</pre></div>
</div>
<table class="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>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, which should be sequence.</li>
<li><strong>offsets</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The offset indices to slice the input sequence, which should
be sequence type.</li>
<li><strong>sizes</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; The sizes of the sub-sequences, which should be sequence type.</li>
<li><strong>act</strong> (<em>paddle.v2.activation.Base.</em>) &#8211; Activation type, paddle.v2.activation.Linear is the default activation.</li>
<li><strong>bias_attr</strong> (<em>paddle.v2.attr.ParameterAttribute | None | bool | Any</em>) &#8211; The bias attribute. If the parameter is set to False or an object
whose type is not paddle.v2.attr.ParameterAttribute, no bias is defined. If the
parameter is set to True, the bias is initialized to zero.</li>
</ul>
</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>
<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>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="concat">
<h3>concat<a class="headerlink" href="#concat" title="永久链接至标题"></a></h3>
......
......@@ -686,43 +686,6 @@ Duplicable: False Optional: False</li>
</table>
</dd></dl>
</div>
<div class="section" id="id1">
<h2>reshape<a class="headerlink" href="#id1" title="永久链接至标题"></a></h2>
<dl class="function">
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">reshape</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span></dt>
<dd><p>Reshape Operator.</p>
<p>Reshape Input(X) into the shape specified by Attr(shape).</p>
<p>An example:
Given a 2-D tensor X with 2 rows and 2 columns</p>
<blockquote>
<div>[[1, 2], [3, 4]]</div></blockquote>
<p>and target shape = [1, 4], the reshape operator will transform
the tensor X into a 2-D tensor:</p>
<blockquote>
<div>[[1, 2, 3, 4]]</div></blockquote>
<p>One dimension in the target shape can be set -1, representing that its
size is unknown. In this case, the real dimension will be infered from
the original shape of Input(X) and other dimensions in the target shape.</p>
<table class="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>x</strong> &#8211; The input tensor of reshape operator.
Duplicable: False Optional: False</li>
<li><strong>shape</strong> (<em>INTS</em>) &#8211; (vector&lt;int&gt;) Target shape of reshape operator.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">返回:</th><td class="field-body"><p class="first last">The output tensor of reshape operator.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="transpose">
<h2>transpose<a class="headerlink" href="#transpose" title="永久链接至标题"></a></h2>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册