class="n">torch</span><span class="o">.</span><span class="n">matmul</span><span class="p">(</span><span class="n">AT</span><span class="p">,</span> <span class="n">resid</span><span class="p">)</span>

            <span class="k">if</span> <span class="n">positive</span><span class="p">:</span>
                <span class="n">index</span> <span class="o">=</span> <span class="n">torch</span><span class="o">.</span><span class="n">argmax</span><span class="p">(</span><span class="n">projections</span><span 