Hello Aditya!



 kendreaditya:




 kendreaditya:

This is where the model starts to overfit, form there the model’s acc increases to 100% on the training set, and the acc for the testing set goes down to 33%, which is equivalent to guessing.


The results do make sense the loss at least.


But you’re talking about two different things here.  The behavior of the
accuracy causes concern about overfitting.  But then you say that the
loss makes sense – but, even if true, this ignores the accuracy issue.
And one of my concerns is that the behaviors of the loss and the
accuracy aren’t consistent with one another.


Using this code with the check you suggested, I got the same results for accuracy, meaning the code is working correctly.
Note: this code is different than the code that was used to produce the image int the original post.


You’re trying to debug some code by running a consistency check on
it.  But you actually run the consistency check on some different code.
Doing this kind of thing just confuses the issue.
Also, if we’re on the same page about the consistency check in
question, I don’t believe your result.
My complaint was that your test accuracy became significantly
better than your training accuracy (in your original graphs, around
epoch 30).  You say with the consistency check you get the same
results for accuracy.
My suggestion was to use half of your training data (33 samples)
as your “test” data.  Your training accuracy (on your 66 training
samples?) is about 40% at epoch 30.   Does this mean that you were
so lucky as to select just the right set of 33 training samples for your
“test” set so that your test accuracy went up to about 55% at epoch 30?
This doesn’t make any sense.  (What do you think would happen if you
tried the other 33 samples for your “test” set?  Or used all 66 training
samples for your “test” set?)
You have an apparent inconsistency – and likely bug – staring you
in the face.  Trying other hyperparameters at this point would just be
sweeping the issue under the rug.
Good luck.
K. Frank