提交 e09129d6 编写于 作者: T Travis CI

Deploy to GitHub Pages: ab6b3c48

上级 d87339de
......@@ -257,6 +257,11 @@ seq_concat
.. autoclass:: paddle.v2.layer.seq_concat
:noindex:
seq_slice
---------
.. autoclass:: paddle.v2.layer.seq_slice
:noindex:
kmax_sequence_score
-------------------
.. autoclass:: paddle.v2.layer.kmax_sequence_score
......
......@@ -2143,6 +2143,54 @@ default Bias.</li>
</table>
</dd></dl>
</div>
<div class="section" id="seq-slice">
<h3>seq_slice<a class="headerlink" href="#seq-slice" 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">seq_slice</code></dt>
<dd><p>seq_slice will return one or several sub-sequences from the
input sequence layer given start and end indices.</p>
<blockquote>
<div><ul class="simple">
<li>If only start indices are given, and end indices are set to None,
this layer slices the input sequence from the given start indices
to its end.</li>
<li>If only end indices are given, and start indices are set to None,
this layer slices the input sequence from its beginning to the
given end indices.</li>
<li>If start and end indices are both given, they should have the same
number of elements.</li>
</ul>
</div></blockquote>
<p>If start or end indices contains more than one elements, the input sequence
will be sliced for multiple times.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">seq_silce</span> <span class="o">=</span> <span class="n">seq_slice</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">starts</span><span class="o">=</span><span class="n">start_pos</span><span class="p">,</span> <span class="n">ends</span><span class="o">=</span><span class="n">end_pos</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; name of this layer.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; input for this layer, it should be a sequence.</li>
<li><strong>starts</strong> (<em>paddle.v2.config_base.Layer|None</em>) &#8211; start indices to slice the input sequence.</li>
<li><strong>ends</strong> (<em>paddle.v2.config_base.Layer|None</em>) &#8211; end indices to slice the input sequence.</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="kmax-sequence-score">
<h3>kmax_sequence_score<a class="headerlink" href="#kmax-sequence-score" title="Permalink to this headline"></a></h3>
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -257,6 +257,11 @@ seq_concat
.. autoclass:: paddle.v2.layer.seq_concat
:noindex:
seq_slice
---------
.. autoclass:: paddle.v2.layer.seq_slice
:noindex:
kmax_sequence_score
-------------------
.. autoclass:: paddle.v2.layer.kmax_sequence_score
......
......@@ -2148,6 +2148,54 @@ default Bias.</li>
</table>
</dd></dl>
</div>
<div class="section" id="seq-slice">
<h3>seq_slice<a class="headerlink" href="#seq-slice" title="永久链接至标题"></a></h3>
<dl class="class">
<dt>
<em class="property">class </em><code class="descclassname">paddle.v2.layer.</code><code class="descname">seq_slice</code></dt>
<dd><p>seq_slice will return one or several sub-sequences from the
input sequence layer given start and end indices.</p>
<blockquote>
<div><ul class="simple">
<li>If only start indices are given, and end indices are set to None,
this layer slices the input sequence from the given start indices
to its end.</li>
<li>If only end indices are given, and start indices are set to None,
this layer slices the input sequence from its beginning to the
given end indices.</li>
<li>If start and end indices are both given, they should have the same
number of elements.</li>
</ul>
</div></blockquote>
<p>If start or end indices contains more than one elements, the input sequence
will be sliced for multiple times.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">seq_silce</span> <span class="o">=</span> <span class="n">seq_slice</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">starts</span><span class="o">=</span><span class="n">start_pos</span><span class="p">,</span> <span class="n">ends</span><span class="o">=</span><span class="n">end_pos</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; name of this layer.</li>
<li><strong>input</strong> (<em>paddle.v2.config_base.Layer</em>) &#8211; input for this layer, it should be a sequence.</li>
<li><strong>starts</strong> (<em>paddle.v2.config_base.Layer|None</em>) &#8211; start indices to slice the input sequence.</li>
<li><strong>ends</strong> (<em>paddle.v2.config_base.Layer|None</em>) &#8211; end indices to slice the input sequence.</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="kmax-sequence-score">
<h3>kmax_sequence_score<a class="headerlink" href="#kmax-sequence-score" title="永久链接至标题"></a></h3>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册