es/losses.loss_base.html#packnet_sfm.losses.loss_base.LossBase.add_metric">[docs]</a>    <span class="k">def</span> <span class="nf">add_metric</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">val</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;Add a new metric to the dictionary and detach it.&quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><spa