pan><span class="n">to</span><span class="p">(</span><span class="n">device</span><span class="p">)</span>



    <span class="n">optimizer</span> <span class="o">=</span> <span class="n">optim</span><span class="o">.</span><span class="n">SGD</span><span class="p">(</span><span class="n">train_net</span><span class="o">.</span><span class="n">parameters</span><span class="p">(),</span> <span class="n">lr</span><span class="o">=</span> <span class="mf">0.1</span><span class="p">,</span> <span class="n">mome