提交 1fe61245 编写于 作者: T Travis CI

Deploy to GitHub Pages: db65f497

上级 af5b4bbb
......@@ -1564,16 +1564,13 @@ the j-th largest entry in input, and its index is topk_indices[j]</p>
<dl class="function">
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">lod_tensor_to_array</code><span class="sig-paren">(</span><em>x</em>, <em>table</em><span class="sig-paren">)</span></dt>
<dd><dl class="docutils">
<dt>This function performs the operation that converts an LOD_Tensor to</dt>
<dd>an array.</dd>
</dl>
<dd><p>Convert a LOD_TENSOR to an LOD_TENSOR_ARRAY.</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> (<em>Variable|list</em>) &#8211; The tensor that needs to be converted to an array.</li>
<li><strong>x</strong> (<em>Variable|list</em>) &#8211; The LOD tensor to be converted to a LOD tensor array.</li>
<li><strong>table</strong> (<em>ParamAttr|list</em>) &#8211; The variable that stores the level of lod
which is ordered by sequence length in
descending order.</li>
......@@ -1607,16 +1604,13 @@ descending order.</li>
<dl class="function">
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">array_to_lod_tensor</code><span class="sig-paren">(</span><em>x</em>, <em>table</em><span class="sig-paren">)</span></dt>
<dd><dl class="docutils">
<dt>This function performs the operations that converts an array to</dt>
<dd>an LOD_Tensor.</dd>
</dl>
<dd><p>Convert a LoD_Tensor_Aarry to an LoDTensor.</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> (<em>Variable|list</em>) &#8211; The array that needs to be converted to a tensor.</li>
<li><strong>x</strong> (<em>Variable|list</em>) &#8211; The lod tensor array to be converted to a tensor.</li>
<li><strong>table</strong> (<em>ParamAttr|list</em>) &#8211; The variable that stores the level of lod
which is ordered by sequence length in
descending order.</li>
......@@ -1652,22 +1646,22 @@ descending order.</li>
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">fill_constant</code><span class="sig-paren">(</span><em>shape</em>, <em>dtype</em>, <em>value</em>, <em>out=None</em><span class="sig-paren">)</span></dt>
<dd><p><strong>fill_constant</strong></p>
<p>This function creates a tensor of specified <em>shape</em> and
<em>dtype</em>, and initializes this with a constant supplied in <em>value</em>.</p>
<p>It also sets <em>stop_gradient</em> to True.</p>
<p>This function creates a tensor with specified <cite>shape</cite> and <cite>dtype</cite>, and
initializes it with a constant specifed by <cite>value</cite>.</p>
<p>The attribute <cite>stop_gradient</cite> of the created tensor is set to True.</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>shape</strong> (<em>tuple|list|None</em>) &#8211; Shape of output tensor</li>
<li><strong>dtype</strong> (<em>np.dtype|core.DataType|str</em>) &#8211; Data type of output tensor</li>
<li><strong>value</strong> (<em>float</em>) &#8211; Constant value to initialize the output tensor</li>
<li><strong>out</strong> (<em>Variable</em>) &#8211; Output Variable to initialize</li>
<li><strong>shape</strong> (<em>tuple|list|None</em>) &#8211; Shape of the output tensor.</li>
<li><strong>dtype</strong> (<em>np.dtype|core.DataType|str</em>) &#8211; Data type of the output tensor.</li>
<li><strong>value</strong> (<em>float</em>) &#8211; The constant value used to initialize the output tensor.</li>
<li><strong>out</strong> (<em>Variable</em>) &#8211; The output tensor.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The tensor variable storing the output</p>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The tensor variable storing the output.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">Variable</p>
......@@ -1835,22 +1829,27 @@ parameter. This operation is performed in-place by default.</p>
<dl class="function">
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">array_write</code><span class="sig-paren">(</span><em>x</em>, <em>i</em>, <em>array=None</em><span class="sig-paren">)</span></dt>
<dd><p>This function performs the operation to write the data out as an
LOD_TENSOR_ARRAY.</p>
<dd><p>This function writes the given input variable to the specified position
indicating by the arrary index to an output LOD_TENSOR_ARRAY. If the
output LOD_TENSOR_ARRAY is not given(None), a new one will be created and
returned.</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> (<em>Variable|list</em>) &#8211; The input tensor from which the data will be read.</li>
<li><strong>i</strong> (<em>Variable|list</em>) &#8211; The subscript index in tensor array, that points the
place from which data will be read.</li>
<li><strong>array</strong> (<em>Variable|list</em>) &#8211; The data can be read into this variable if
this is assigned.</li>
<li><strong>i</strong> (<em>Variable|list</em>) &#8211; The index of the output LOD_TENSOR_ARRAY, pointing to
the position to which the input tensor will be
written.</li>
<li><strong>array</strong> (<em>Variable|list</em>) &#8211; The output LOD_TENSOR_ARRAY to which the input
tensor will be written. If this parameter is
NONE, a new LOD_TENSOR_ARRAY will be created and
returned.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The tensor type variable that has the data written to it.</p>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The output LOD_TENSOR_ARRAY where the input tensor is written.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">Variable</p>
......
......@@ -2216,23 +2216,23 @@
} ]
},{
"type" : "reorder_lod_tensor_by_rank",
"comment" : "ReorderLoDTensorByRankTable\n\nReorder the input X by the rank of `RankTable`. If `RankTable` is ordered by\nindex [3, 0, 2, 1]. Input X will reorder its sequence, the third sequence of\nX will be the first sequence of Output.\n\nNOTE: The RankTable does not need to be calculated by X.\n\nFor example:\nThe X = [Seq0, Seq1, Seq2, Seq3]. The indices of RankTable are [3, 0, 2, 1].\n\nThe Out = [Seq3, Seq0, Seq2, Seq1] with correct LoD information.\n",
"comment" : "ReorderLoDTensorByRankTable operator.\n\nInput(X) is a batch of sequences. Input(RankTable) stores new orders of the\ninput sequence batch. The reorder_lod_tensor_by_rank operator reorders the\nInput(X) according to the information provided by Input(RankTable).\n\nFor example:\n\nIf the indices stored in the Input(RankTable) are [3, 0, 2, 1], the\nInput(X) will be reordered that the fourth sequence in Input(X) will become the\nfirst one, and then followed by the original first, third, and the second one.\n\nThis is:\nX = [Seq0, Seq1, Seq2, Seq3]. The indices in RankTable are [3, 0, 2, 1].\nOut = [Seq3, Seq0, Seq2, Seq1] with a new LoD information.\n\nIf the LoD information of Input(X) is empty, this means Input(X) is not sequence\ndata. This is also identical to a batch of sequences where each sequence has a\nfixed length 1. In this case, the reorder_lod_tensor_by_rank operator reorders\neach slice of Input(X) along the first axis according to Input(RankTable).\n\nThis is:\nX = [Slice0, Slice1, Slice2, Slice3] and its LoD information is empty. The\nindices in RankTable are [3, 0, 2, 1].\nOut = [Slice3, Slice0, Slice2, Slice1] with no LoD information is appended.\n\nNOTE: This operator sorts Input(X) according to a given LoDRankTable which does\nnot need to be calculated according to Input(X). It can be calculated according\nto another different sequence, and then this operator sorts Input(X) according\nto the given LoDRankTable.\n\n",
"inputs" : [
{
"name" : "X",
"comment" : "(LoDTensor) the input lod tensor need to be reordered.",
"comment" : "(LoDTensor), the input lod tensor to be reordered according to Input(RankTable).",
"duplicable" : 0,
"intermediate" : 0
}, {
"name" : "RankTable",
"comment" : "(LoDRankTable) the rank table that input need follow",
"comment" : "(LoDRankTable), the rank table according to which Input(X) is reordered.",
"duplicable" : 0,
"intermediate" : 0
} ],
"outputs" : [
{
"name" : "Out",
"comment" : "(LoDTensor) reordered lod tensor",
"comment" : "(LoDTensor), the reordered lod tensor.",
"duplicable" : 0,
"intermediate" : 0
} ],
......@@ -2485,7 +2485,7 @@
} ]
},{
"type" : "shrink_rnn_memory",
"comment" : "\n In dynamic RNN, we are able to handle sequences of different lengths.\n Because of the multiple lengths, the size of each step input can be\n different, which may lead to a mismatching between the input of\n the current step and the memory generated by the previous one. This\n operator shrinks memory according to the size of the next step input,\n to make sure that they can match each other.\n ",
"comment" : "\nThis operator is used to shrink output batch of memory defined in dynamic RNN.\n\nDynamic RNN is able to handle variable-length sequences, in which, sequences in\na mini-batch are sorted by their lengths first. After that, the longest sequence\nbecomes the first one in the sorted batch, followed by the second longest, the\nthird longest, and so on. Dynamic RNN then slices a batch input timestep by\ntimestep from the sorted input. Once any sequence in the input batch reaches its\nend, memory defined in dynamicRNN has to shrink its outputs to adapt to the input\nbatch size for the next time step.\n",
"inputs" : [
{
"name" : "X",
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -1583,16 +1583,13 @@ the j-th largest entry in input, and its index is topk_indices[j]</p>
<dl class="function">
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">lod_tensor_to_array</code><span class="sig-paren">(</span><em>x</em>, <em>table</em><span class="sig-paren">)</span></dt>
<dd><dl class="docutils">
<dt>This function performs the operation that converts an LOD_Tensor to</dt>
<dd>an array.</dd>
</dl>
<dd><p>Convert a LOD_TENSOR to an LOD_TENSOR_ARRAY.</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> (<em>Variable|list</em>) &#8211; The tensor that needs to be converted to an array.</li>
<li><strong>x</strong> (<em>Variable|list</em>) &#8211; The LOD tensor to be converted to a LOD tensor array.</li>
<li><strong>table</strong> (<em>ParamAttr|list</em>) &#8211; The variable that stores the level of lod
which is ordered by sequence length in
descending order.</li>
......@@ -1626,16 +1623,13 @@ descending order.</li>
<dl class="function">
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">array_to_lod_tensor</code><span class="sig-paren">(</span><em>x</em>, <em>table</em><span class="sig-paren">)</span></dt>
<dd><dl class="docutils">
<dt>This function performs the operations that converts an array to</dt>
<dd>an LOD_Tensor.</dd>
</dl>
<dd><p>Convert a LoD_Tensor_Aarry to an LoDTensor.</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> (<em>Variable|list</em>) &#8211; The array that needs to be converted to a tensor.</li>
<li><strong>x</strong> (<em>Variable|list</em>) &#8211; The lod tensor array to be converted to a tensor.</li>
<li><strong>table</strong> (<em>ParamAttr|list</em>) &#8211; The variable that stores the level of lod
which is ordered by sequence length in
descending order.</li>
......@@ -1671,22 +1665,22 @@ descending order.</li>
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">fill_constant</code><span class="sig-paren">(</span><em>shape</em>, <em>dtype</em>, <em>value</em>, <em>out=None</em><span class="sig-paren">)</span></dt>
<dd><p><strong>fill_constant</strong></p>
<p>This function creates a tensor of specified <em>shape</em> and
<em>dtype</em>, and initializes this with a constant supplied in <em>value</em>.</p>
<p>It also sets <em>stop_gradient</em> to True.</p>
<p>This function creates a tensor with specified <cite>shape</cite> and <cite>dtype</cite>, and
initializes it with a constant specifed by <cite>value</cite>.</p>
<p>The attribute <cite>stop_gradient</cite> of the created tensor is set to True.</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>shape</strong> (<em>tuple|list|None</em>) &#8211; Shape of output tensor</li>
<li><strong>dtype</strong> (<em>np.dtype|core.DataType|str</em>) &#8211; Data type of output tensor</li>
<li><strong>value</strong> (<em>float</em>) &#8211; Constant value to initialize the output tensor</li>
<li><strong>out</strong> (<em>Variable</em>) &#8211; Output Variable to initialize</li>
<li><strong>shape</strong> (<em>tuple|list|None</em>) &#8211; Shape of the output tensor.</li>
<li><strong>dtype</strong> (<em>np.dtype|core.DataType|str</em>) &#8211; Data type of the output tensor.</li>
<li><strong>value</strong> (<em>float</em>) &#8211; The constant value used to initialize the output tensor.</li>
<li><strong>out</strong> (<em>Variable</em>) &#8211; The output tensor.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">返回:</th><td class="field-body"><p class="first">The tensor variable storing the output</p>
<tr class="field-even field"><th class="field-name">返回:</th><td class="field-body"><p class="first">The tensor variable storing the output.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">返回类型:</th><td class="field-body"><p class="first last">Variable</p>
......@@ -1854,22 +1848,27 @@ parameter. This operation is performed in-place by default.</p>
<dl class="function">
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">array_write</code><span class="sig-paren">(</span><em>x</em>, <em>i</em>, <em>array=None</em><span class="sig-paren">)</span></dt>
<dd><p>This function performs the operation to write the data out as an
LOD_TENSOR_ARRAY.</p>
<dd><p>This function writes the given input variable to the specified position
indicating by the arrary index to an output LOD_TENSOR_ARRAY. If the
output LOD_TENSOR_ARRAY is not given(None), a new one will be created and
returned.</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> (<em>Variable|list</em>) &#8211; The input tensor from which the data will be read.</li>
<li><strong>i</strong> (<em>Variable|list</em>) &#8211; The subscript index in tensor array, that points the
place from which data will be read.</li>
<li><strong>array</strong> (<em>Variable|list</em>) &#8211; The data can be read into this variable if
this is assigned.</li>
<li><strong>i</strong> (<em>Variable|list</em>) &#8211; The index of the output LOD_TENSOR_ARRAY, pointing to
the position to which the input tensor will be
written.</li>
<li><strong>array</strong> (<em>Variable|list</em>) &#8211; The output LOD_TENSOR_ARRAY to which the input
tensor will be written. If this parameter is
NONE, a new LOD_TENSOR_ARRAY will be created and
returned.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">返回:</th><td class="field-body"><p class="first">The tensor type variable that has the data written to it.</p>
<tr class="field-even field"><th class="field-name">返回:</th><td class="field-body"><p class="first">The output LOD_TENSOR_ARRAY where the input tensor is written.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">返回类型:</th><td class="field-body"><p class="first last">Variable</p>
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册