<codeclass="descname">states</code><aclass="headerlink"href="#paddle.v2.fluid.evaluator.Evaluator.states"title="Permalink to this definition">¶</a></dt>
<dd><p><em>list</em>– The list of state variables. states will be reset to zero
<codeclass="descname">metrics</code><aclass="headerlink"href="#paddle.v2.fluid.evaluator.Evaluator.metrics"title="Permalink to this definition">¶</a></dt>
<dd><p><em>list</em>– The list of metrics variables. They will be calculate
<li><strong>input</strong> (<em>Variable</em>) – The input variable which is a Tensor or LoDTensor.</li>
<li><strong>dim</strong> (<em>int</em>) – The dimension along which to split. If <spanclass="math">\(dim < 0\)</span>, the
dimension to split along is <spanclass="math">\(rank(input) + dim\)</span>.</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">The Tensor variable with half the size of input.</p>
<li><strong>query</strong> (<em>Variable</em>) – The input variable which is a Tensor or LoDTensor.</li>
<li><strong>key</strong> (<em>Variable</em>) – The input variable which is a Tensor or LoDTensor.</li>
<li><strong>value</strong> (<em>Variable</em>) – The input variable which is a Tensor or LoDTensor.</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">The Tensor variables representing the output and attention scores.</p>
<divclass="highlight-python"><divclass="highlight"><pre><span></span><spanclass="c1"># Suppose q, k, v are tensor variables with the following shape:</span>
<li><strong>loss</strong>– the target that this optimization is for.</li>
<li><strong>parameters_and_grads</strong>– a list of (variable, gradient) pair to update.</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">a list of operators that will complete one step of
optimization. This will include parameter update ops, global step
update ops and any other custom ops required by subclasses to manage
<spanid="l1decayregularizer"></span><h2>L1DecayRegularizer<aclass="headerlink"href="#module-paddle.v2.fluid.regularizer"title="Permalink to this headline">¶</a></h2>
<emclass="property">class </em><codeclass="descclassname">paddle.v2.fluid.regularizer.</code><codeclass="descname">L1DecayRegularizer</code><spanclass="sig-paren">(</span><em>regularization_coeff=0.0</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#paddle.v2.fluid.regularizer.L1DecayRegularizer"title="Permalink to this definition">¶</a></dt>
<dd><p>Implements the L1 Weight Decay Regularization</p>
<li><ahref="api/v2/data/image.html#paddle.v2.image.left_right_flip">left_right_flip() (in module paddle.v2.image)</a>
<li><ahref="api/v2/fluid/regularizer.html#paddle.v2.fluid.regularizer.L1DecayRegularizer">L1DecayRegularizer (class in paddle.v2.fluid.regularizer)</a>
</li>
<li><ahref="api/v2/data/image.html#paddle.v2.image.load_and_transform">load_and_transform() (in module paddle.v2.image)</a>
<li><ahref="api/v2/data/image.html#paddle.v2.image.left_right_flip">left_right_flip() (in module paddle.v2.image)</a>
</li>
</ul></td>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<li><ahref="api/v2/data/image.html#paddle.v2.image.load_and_transform">load_and_transform() (in module paddle.v2.image)</a>
</li>
<li><ahref="api/v2/data/image.html#paddle.v2.image.load_image">load_image() (in module paddle.v2.image)</a>
</li>
<li><ahref="api/v2/data/image.html#paddle.v2.image.load_image_bytes">load_image_bytes() (in module paddle.v2.image)</a>
<li><ahref="api/v1/data_provider/pydataprovider2_en.html#paddle.trainer.PyDataProvider2.provider">provider() (in module paddle.trainer.PyDataProvider2)</a>
<li><strong>query</strong> (<em>Variable</em>) – The input variable which is a Tensor or LoDTensor.</li>
<li><strong>key</strong> (<em>Variable</em>) – The input variable which is a Tensor or LoDTensor.</li>
<li><strong>value</strong> (<em>Variable</em>) – The input variable which is a Tensor or LoDTensor.</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">返回:</th><tdclass="field-body"><pclass="first">The Tensor variables representing the output and attention scores.</p>
<divclass="highlight-python"><divclass="highlight"><pre><span></span><spanclass="c1"># Suppose q, k, v are tensor variables with the following shape:</span>