loss</span>

            <span class="c1"># Logging the performance of the models</span>
            <span class="n">train_log</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">train_loss</span><span class="p">)</span>
            <span class="n">val_log</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">val_loss</span><span class="p">)</span>
            <span class="bp">self</span><span class="o">.</span><span