ensorReplacer.replace_user_define_modules">[docs]</a>    <span class="k">def</span> <span class="nf">replace_user_define_modules</span><span class="p">(</span>
        <span class="bp">self</span><span class="p">,</span>
        <span class="n">model</span><span class="p">:</span> <span class="n">nn</span><span class="o">.</span><span class="n">Module</span><span class="p">,</span>
        <span class="n">policy_cls</span><span class="p">:</span> <span class="n">Type</span><span class="p">[</span><span clas