@@ -7794,7 +7794,8 @@ Hierarchical Probabilistic Neural Network Language Model.”</p>
...
@@ -7794,7 +7794,8 @@ Hierarchical Probabilistic Neural Network Language Model.”</p>
<dl class="class">
<dl class="class">
<dt id="_CPPv2N6paddle8NCELayerE">
<dt id="_CPPv2N6paddle8NCELayerE">
<span id="paddle::NCELayer"></span><span class="target" id="paddleclasspaddle_1_1NCELayer"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">NCELayer</code><a class="headerlink" href="#_CPPv2N6paddle8NCELayerE" title="Permalink to this definition">¶</a></dt>
<span id="paddle::NCELayer"></span><span class="target" id="paddleclasspaddle_1_1NCELayer"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">NCELayer</code><a class="headerlink" href="#_CPPv2N6paddle8NCELayerE" title="Permalink to this definition">¶</a></dt>
<dd><p>Noise-contrastive estimation Implements the method in the following paper: A fast and simple algorithm for training neural probabilistic language models </p>
<dd><p>Noise-contrastive estimation. Implements the method in the following paper: A fast and simple algorithm for training neural probabilistic language models.</p>
<p>The config file api is nce_layer. </p>
<p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1Layer"><span class="std std-ref">paddle::Layer</span></a></p>
<p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1Layer"><span class="std std-ref">paddle::Layer</span></a></p>
<li><strong>input</strong> (<em>LayerOutput|list|tuple|collections.Sequence</em>) – input layers. It could be a LayerOutput of list/tuple of LayerOutput.</li>
<li><strong>weight</strong> (<em>LayerOutput</em>) – weight layer, can be None(default)</li>
<li><strong>num_classes</strong> (<em>int</em>) – number of classes.</li>
<li><strong>num_neg_samples</strong> (<em>int</em>) – number of negative samples. Default is 10.</li>
<li><strong>neg_distribution</strong> (<em>list|tuple|collections.Sequence|None</em>) – The distribution for generating the random negative labels.
A uniform distribution will be used if not provided.
If not None, its length must be equal to num_classes.</li>
<li><strong>bias_attr</strong> (<em>ParameterAttribute|None|False</em>) – Bias parameter attribute. True if no bias.</li>
<li><strong>layer_attr</strong> (<aclass="reference internal"href="attrs.html#paddle.trainer_config_helpers.attrs.ExtraLayerAttribute"title="paddle.trainer_config_helpers.attrs.ExtraLayerAttribute"><em>ExtraLayerAttribute</em></a>) – Extra Layer Attribute.</li>