Question about test_loss value #185
-
After doing the pizza_steak_sushi classifier, I decided to train the model using my own images. With a learning rate of 0.001, I can achieve test_accuracy of around 65% or so. I lowered learning rate to 0.00045 and was able to increase test_accuracy to about 75%, and train_accuracy to 99%+
Now, my question is the value of my test_loss. It seems so high, at 2.89. When I started training, it was in-sync with train_loss, just a few points higher. But now train_loss is 0.0068 and 99% train accuracy and test_loss is way up high. I would expect test_loss to be roughly the same value as train_loss? Any idea what's going on? What does this say about the training? Is this overfitting? There's about 75 train images and 25 test images for each class, with 7 different classes. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Beta Was this translation helpful? Give feedback.
-
@ztjhz is right, generally if the As in the model is memorizing patterns in the training data that don't generalize to the unseen data of the test set. See here for ideas on how to prevent overfitting: https://www.learnpytorch.io/04_pytorch_custom_datasets/#81-how-to-deal-with-overfitting |
Beta Was this translation helpful? Give feedback.
test_loss
higher thantrain_loss
means is a sign that your model might be overfitted on the training data set.