="bp">self</span><span class="o">.</span><span class="n">n_epochs</span><span class="p">):</span>

            <span class="c1"># Train and validate the model</span>
            <span class="n">train_loss</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">train</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">train_loader</span><span class="p">)</span>
            <span class="n">val_loss</span> <span class="o"