<li><strong>input</strong> (<em>Variable|list</em>) – The input tensor(s) to the fully connected layer.</li>
<li><strong>size</strong> (<em>int</em>) – The number of output units in the fully connected layer.</li>
<li><strong>num_flatten_dims</strong> (<em>int</em>) – The fc layer can accept an input tensor with more
than two dimensions. If this happens, the
multidimensional tensor will first be flattened
into a 2-dimensional matrix. The parameter
<cite>num_flatten_dims</cite> determines how the input tensor
...
...
@@ -268,37 +266,41 @@ For example, suppose <cite>X</cite> is a 6-dimensional tensor
with a shape [2, 3, 4, 5, 6], and
<cite>x_num_col_dims</cite> = 3. Then, the flattened matrix
will have a shape [2 x 3 x 4, 5 x 6] = [24, 30].
By default, <cite>x_num_col_dims</cite> is set to 1.</div></blockquote>
<dlclass="docutils">
<dt>param_attr(ParamAttr|list): The parameter attribute for learnable</dt>
<dd>parameters/weights of the fully connected
layer.</dd>
<dt>param_initializer(ParamAttr|list): The initializer used for the</dt>
<dd>weight/parameter. If set None,
XavierInitializer() will be used.</dd>
<dt>bias_attr(ParamAttr|list): The parameter attribute for the bias parameter</dt>
<dd>for this layer. If set None, no bias will be
added to the output units.</dd>
<dt>bias_initializer(ParamAttr|list): The initializer used for the bias.</dt>
<dd>If set None, then ConstantInitializer()
will be used.</dd>
<dt>act(str): Activation to be applied to the output of the fully connected</dt>
<dd>layer.</dd>
</dl>
<pclass="last">name(str): Name/alias of the fully connected layer.</p>
</dd>
<dt>Returns:</dt>
<dd>Variable: The output tensor variable.</dd>
<dt>Raises:</dt>
<dd>ValueError: If rank of the input tensor is less than 2.</dd>
<dt>Examples:</dt>
<dd><divclass="first last highlight-python"><divclass="highlight"><pre><span></span><spanclass="n">data</span><spanclass="o">=</span><spanclass="n">fluid</span><spanclass="o">.</span><spanclass="n">layers</span><spanclass="o">.</span><spanclass="n">data</span><spanclass="p">(</span><spanclass="n">name</span><spanclass="o">=</span><spanclass="s2">"data"</span><spanclass="p">,</span><spanclass="n">shape</span><spanclass="o">=</span><spanclass="p">[</span><spanclass="mi">32</span><spanclass="p">,</span><spanclass="mi">32</span><spanclass="p">],</span><spanclass="n">dtype</span><spanclass="o">=</span><spanclass="s2">"float32"</span><spanclass="p">)</span>
By default, <cite>x_num_col_dims</cite> is set to 1.</li>
<li><strong>param_attr</strong> (<em>ParamAttr|list</em>) – The parameter attribute for learnable
parameters/weights of the fully connected
layer.</li>
<li><strong>param_initializer</strong> (<em>ParamAttr|list</em>) – The initializer used for the
weight/parameter. If set None,
XavierInitializer() will be used.</li>
<li><strong>bias_attr</strong> (<em>ParamAttr|list</em>) – The parameter attribute for the bias parameter
for this layer. If set None, no bias will be
added to the output units.</li>
<li><strong>bias_initializer</strong> (<em>ParamAttr|list</em>) – The initializer used for the bias.
If set None, then ConstantInitializer()
will be used.</li>
<li><strong>act</strong> (<em>str</em>) – Activation to be applied to the output of the fully connected
layer.</li>
<li><strong>name</strong> (<em>str</em>) – Name/alias of the fully connected layer.</li>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last"><codeclass="xref py py-exc docutils literal"><spanclass="pre">ValueError</span></code>– If rank of the input tensor is less than 2.</p>
<li><strong>input</strong> (<em>Variable|list</em>) – The input tensor(s) to the fully connected layer.</li>
<li><strong>size</strong> (<em>int</em>) – The number of output units in the fully connected layer.</li>
<li><strong>num_flatten_dims</strong> (<em>int</em>) – The fc layer can accept an input tensor with more
than two dimensions. If this happens, the
multidimensional tensor will first be flattened
into a 2-dimensional matrix. The parameter
<cite>num_flatten_dims</cite> determines how the input tensor
...
...
@@ -281,37 +279,41 @@ For example, suppose <cite>X</cite> is a 6-dimensional tensor
with a shape [2, 3, 4, 5, 6], and
<cite>x_num_col_dims</cite> = 3. Then, the flattened matrix
will have a shape [2 x 3 x 4, 5 x 6] = [24, 30].
By default, <cite>x_num_col_dims</cite> is set to 1.</div></blockquote>
<dlclass="docutils">
<dt>param_attr(ParamAttr|list): The parameter attribute for learnable</dt>
<dd>parameters/weights of the fully connected
layer.</dd>
<dt>param_initializer(ParamAttr|list): The initializer used for the</dt>
<dd>weight/parameter. If set None,
XavierInitializer() will be used.</dd>
<dt>bias_attr(ParamAttr|list): The parameter attribute for the bias parameter</dt>
<dd>for this layer. If set None, no bias will be
added to the output units.</dd>
<dt>bias_initializer(ParamAttr|list): The initializer used for the bias.</dt>
<dd>If set None, then ConstantInitializer()
will be used.</dd>
<dt>act(str): Activation to be applied to the output of the fully connected</dt>
<dd>layer.</dd>
</dl>
<pclass="last">name(str): Name/alias of the fully connected layer.</p>
</dd>
<dt>Returns:</dt>
<dd>Variable: The output tensor variable.</dd>
<dt>Raises:</dt>
<dd>ValueError: If rank of the input tensor is less than 2.</dd>
<dt>Examples:</dt>
<dd><divclass="first last highlight-python"><divclass="highlight"><pre><span></span><spanclass="n">data</span><spanclass="o">=</span><spanclass="n">fluid</span><spanclass="o">.</span><spanclass="n">layers</span><spanclass="o">.</span><spanclass="n">data</span><spanclass="p">(</span><spanclass="n">name</span><spanclass="o">=</span><spanclass="s2">"data"</span><spanclass="p">,</span><spanclass="n">shape</span><spanclass="o">=</span><spanclass="p">[</span><spanclass="mi">32</span><spanclass="p">,</span><spanclass="mi">32</span><spanclass="p">],</span><spanclass="n">dtype</span><spanclass="o">=</span><spanclass="s2">"float32"</span><spanclass="p">)</span>
By default, <cite>x_num_col_dims</cite> is set to 1.</li>
<li><strong>param_attr</strong> (<em>ParamAttr|list</em>) – The parameter attribute for learnable
parameters/weights of the fully connected
layer.</li>
<li><strong>param_initializer</strong> (<em>ParamAttr|list</em>) – The initializer used for the
weight/parameter. If set None,
XavierInitializer() will be used.</li>
<li><strong>bias_attr</strong> (<em>ParamAttr|list</em>) – The parameter attribute for the bias parameter
for this layer. If set None, no bias will be
added to the output units.</li>
<li><strong>bias_initializer</strong> (<em>ParamAttr|list</em>) – The initializer used for the bias.
If set None, then ConstantInitializer()
will be used.</li>
<li><strong>act</strong> (<em>str</em>) – Activation to be applied to the output of the fully connected
layer.</li>
<li><strong>name</strong> (<em>str</em>) – Name/alias of the fully connected layer.</li>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last"><codeclass="xref py py-exc docutils literal"><spanclass="pre">ValueError</span></code>– If rank of the input tensor is less than 2.</p>