_val_batch</span><span class="p">,</span> <span class="n">y_val_batch</span> <span class="ow">in</span> <span class="n">val_loader</span><span class="p">:</span>
            <span class="c1"># Ensures that the gradients are not updated</span>
            <span class="k">with</span> <span class="n">torch</span><span class="o">.</span><span class="n">no_grad</span><span class="p">():</span>
                <span class="c1"># Sending the data to GPU if available</span>
                <span class="n">X_val_bat