提交 03270b4c 编写于 作者: T Travis CI

Deploy to GitHub Pages: 22fba722

上级 a74553db
......@@ -326,32 +326,42 @@ constructor.</p>
<dl class="function">
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">data</code><span class="sig-paren">(</span><em>name</em>, <em>shape</em>, <em>append_batch_size=True</em>, <em>dtype='float32'</em>, <em>lod_level=0</em>, <em>type=VarType.LOD_TENSOR</em>, <em>stop_gradient=True</em><span class="sig-paren">)</span></dt>
<dd><p>Data Layer.</p>
<dd><p><strong>Data Layer</strong></p>
<p>This function takes in the input and based on whether data has
to be returned back as a minibatch, it creates the global variable using
the helper functions. The global variables can be accessed by all the
following operations and layers in the graph.</p>
<p>All the input variables of this function are passed in as local variables
to the LayerHelper constructor.</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 last simple">
<li><strong>name</strong> &#8211; The name/alias of the function</li>
<li><strong>shape</strong> &#8211; Tuple declaring the shape.</li>
<li><strong>append_batch_size</strong> &#8211; Whether or not to append the data as a batch.</li>
<li><strong>dtype</strong> &#8211; The type of data : float32, float_16, int etc</li>
<li><strong>type</strong> &#8211; The output type. By default it is LOD_TENSOR.</li>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> (<em>str</em>) &#8211; The name/alias of the function</li>
<li><strong>shape</strong> (<em>list</em>) &#8211; Tuple declaring the shape.</li>
<li><strong>append_batch_size</strong> (<em>bool</em>) &#8211; Whether or not to append the data as a batch.</li>
<li><strong>dtype</strong> (<em>int|float</em>) &#8211; The type of data : float32, float_16, int etc</li>
<li><strong>type</strong> (<em>VarType</em>) &#8211; The output type. By default it is LOD_TENSOR.</li>
<li><strong>lod_level</strong> (<em>int</em>) &#8211; The LoD Level. 0 means the input data is not a sequence.</li>
<li><strong>main_program</strong> &#8211; Name of the main program that calls this</li>
<li><strong>startup_program</strong> &#8211; Name of the startup program</li>
<li><strong>stop_gradient</strong> &#8211; A boolean that mentions whether gradient should flow.</li>
<li><strong>main_program</strong> (<em>Program</em>) &#8211; Name of the main program that calls this</li>
<li><strong>startup_program</strong> (<em>Program</em>) &#8211; Name of the startup program</li>
<li><strong>stop_gradient</strong> (<em>bool</em>) &#8211; A boolean that mentions whether gradient should flow.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The global variable that gives access to the data.</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>
</td>
</tr>
</tbody>
</table>
<p>This function takes in input and based on whether data has
to be returned back as a minibatch, it creates the global variable using
the helper functions. The global variables can be accessed by all the
following operations and layers in the graph.</p>
<p>All the input variables of this function are passed in as local variables
to the LayerHelper constructor.</p>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">data</span> <span class="o">=</span> <span class="n">fluid</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">data</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">&#39;x&#39;</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">[</span><span class="mi">784</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s1">&#39;float32&#39;</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
</div>
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -339,32 +339,42 @@ constructor.</p>
<dl class="function">
<dt>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">data</code><span class="sig-paren">(</span><em>name</em>, <em>shape</em>, <em>append_batch_size=True</em>, <em>dtype='float32'</em>, <em>lod_level=0</em>, <em>type=VarType.LOD_TENSOR</em>, <em>stop_gradient=True</em><span class="sig-paren">)</span></dt>
<dd><p>Data Layer.</p>
<dd><p><strong>Data Layer</strong></p>
<p>This function takes in the input and based on whether data has
to be returned back as a minibatch, it creates the global variable using
the helper functions. The global variables can be accessed by all the
following operations and layers in the graph.</p>
<p>All the input variables of this function are passed in as local variables
to the LayerHelper constructor.</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 last simple">
<li><strong>name</strong> &#8211; The name/alias of the function</li>
<li><strong>shape</strong> &#8211; Tuple declaring the shape.</li>
<li><strong>append_batch_size</strong> &#8211; Whether or not to append the data as a batch.</li>
<li><strong>dtype</strong> &#8211; The type of data : float32, float_16, int etc</li>
<li><strong>type</strong> &#8211; The output type. By default it is LOD_TENSOR.</li>
<tr class="field-odd field"><th class="field-name">参数:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> (<em>str</em>) &#8211; The name/alias of the function</li>
<li><strong>shape</strong> (<em>list</em>) &#8211; Tuple declaring the shape.</li>
<li><strong>append_batch_size</strong> (<em>bool</em>) &#8211; Whether or not to append the data as a batch.</li>
<li><strong>dtype</strong> (<em>int|float</em>) &#8211; The type of data : float32, float_16, int etc</li>
<li><strong>type</strong> (<em>VarType</em>) &#8211; The output type. By default it is LOD_TENSOR.</li>
<li><strong>lod_level</strong> (<em>int</em>) &#8211; The LoD Level. 0 means the input data is not a sequence.</li>
<li><strong>main_program</strong> &#8211; Name of the main program that calls this</li>
<li><strong>startup_program</strong> &#8211; Name of the startup program</li>
<li><strong>stop_gradient</strong> &#8211; A boolean that mentions whether gradient should flow.</li>
<li><strong>main_program</strong> (<em>Program</em>) &#8211; Name of the main program that calls this</li>
<li><strong>startup_program</strong> (<em>Program</em>) &#8211; Name of the startup program</li>
<li><strong>stop_gradient</strong> (<em>bool</em>) &#8211; A boolean that mentions whether gradient should flow.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">返回:</th><td class="field-body"><p class="first">The global variable that gives access to the data.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">返回类型:</th><td class="field-body"><p class="first last">Variable</p>
</td>
</tr>
</tbody>
</table>
<p>This function takes in input and based on whether data has
to be returned back as a minibatch, it creates the global variable using
the helper functions. The global variables can be accessed by all the
following operations and layers in the graph.</p>
<p>All the input variables of this function are passed in as local variables
to the LayerHelper constructor.</p>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">data</span> <span class="o">=</span> <span class="n">fluid</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">data</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">&#39;x&#39;</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">[</span><span class="mi">784</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s1">&#39;float32&#39;</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
</div>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册