pan class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;both weight and bias are empty !&quot;</span><span class="p">)</span>

            <span class="k">if</span> <span class="n">replace</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
                <span class="n">orig_layer</span><span class="o">.</span><span class="vm">__class__</span> <span class="o">=</span> <span class="n">replace</span>
                <span c