Accuracy and Loss validation stuck

Ivan_A: <p>Hello everyone, When I run my model, it gives me the following result, my accuracy in training increases, and the error in training decreases, but when I validate, it does not increase or decrease. Can someone guide me?</p>
<pre><code class="lang-auto">

Epoch 0/19
----------
train Loss: 0.2080 Acc: 0.9127
val Loss: 1.9388 Acc: 0.5716

Epoch 1/19
----------
train Loss: 0.2081 Acc: 0.9117
val Loss: 1.9498 Acc: 0.5949

Epoch 2/19
----------
train Loss: 0.2057 Acc: 0.9125
val Loss: 2.0436 Acc: 0.5814

Epoch 3/19
----------
train Loss: 0.2102 Acc: 0.9111
val Loss: 1.6863 Acc: 0.5973

Epoch 4/19
----------
train Loss: 0.2064 Acc: 0.9108
val Loss: 1.8532 Acc: 0.5802

Epoch 5/19
----------
train Loss: 0.2050 Acc: 0.9112
val Loss: 1.9416 Acc: 0.5667

Epoch 6/19
----------
train Loss: 0.1812 Acc: 0.9212
val Loss: 1.8484 Acc: 0.5814

Epoch 7/19
----------
train Loss: 0.1644 Acc: 0.9293
val Loss: 1.8913 Acc: 0.5802

Epoch 8/19
----------
train Loss: 0.1548 Acc: 0.9340
val Loss: 1.8807 Acc: 0.5716

Epoch 9/19
----------
train Loss: 0.1585 Acc: 0.9328
val Loss: 1.8908 Acc: 0.5728

Epoch 10/19
----------
train Loss: 0.1533 Acc: 0.9352
val Loss: 1.9874 Acc: 0.5814

Epoch 11/19
----------
train Loss: 0.1450 Acc: 0.9399
val Loss: 2.0618 Acc: 0.5949

Epoch 12/19
----------
train Loss: 0.1464 Acc: 0.9406
val Loss: 2.1211 Acc: 0.5789

Epoch 13/19
----------
train Loss: 0.1447 Acc: 0.9364
val Loss: 2.1088 Acc: 0.5802

Epoch 14/19
----------
train Loss: 0.1421 Acc: 0.9386
val Loss: 2.0540 Acc: 0.5851

Epoch 15/19
----------
train Loss: 0.1483 Acc: 0.9376
val Loss: 2.1731 Acc: 0.5851

Epoch 16/19
----------
train Loss: 0.1420 Acc: 0.9408
val Loss: 2.1140 Acc: 0.5741

Epoch 17/19
----------
train Loss: 0.1516 Acc: 0.9346
val Loss: 2.1321 Acc: 0.5741
</code></pre>
<p>model = models.resnet152(pretrained=True)<br>
batch_size=32<br>
optimizer_ft = optim.SGD(model_ft.parameters(), lr=0.001, momentum=0.9)<br>
exp_lr_scheduler = lr_scheduler.StepLR(optimizer_ft, step_size=7, gamma=0.1)</p>
<p>The problem is about binary classification:<br>
ADHD = Attention-deficit/hyperactivity disorder.<br>
Control = Non-ADHD.</p>
<p>train &gt; ADHD &gt; 3800 Images<br>
&gt;Control&gt;4100 Images</p>
<p>val &gt; ADHD &gt; 608 Images<br>
&gt;Control &gt; 692 Images</p>
<p>Is the number of validation images large enough?</p>

Ivan_A: <p>That’s mean the model is overfitting?. I trained for around 5 days and 520 epochs, what can I do to resolve this?</p>
<p>Actually, I saved the model every 20 epochs, can I back and prevent this?</p>

Ivan_A: <aside class="quote" data-post="1" data-topic="1902">
  <div class="title">
    <div class="quote-controls"></div>
    <img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/nikmentenson/48/32791_2.png" class="avatar">
    <a href="https://discuss.pytorch.org/t/how-to-prevent-overfitting/1902">How to Prevent Overfitting</a> 
  </div>
  <blockquote>
    How do you prevent overfitting when your dataset is not that large? My dataset consists of 110 classes, with a total dataset size of about 20k images. 
I have tried data augmentation by a factor of about 16x, but it does not help too much with overfitting. 
Right now, with my augmented dataset, at epoch 8, I am getting a testset Top1 accuracy of 45% but a trainset Top1 accuracy of 69%.
  </blockquote>
</aside>


Ivan_A: <p>The model takes a long time in the training phase (3 - 4 days), because it is not really managing to learn, it is necessary to make an extraction of characteristics and a selection of them, then when you already have the most significant ones, convert them to images I finally decided to use Continuous Wavelet Transform to get a Power Spectrum Analysis</p>