Out of wack for plot_loss_curves #103
-
First of all YouAreAmazing!! I implemented my first pytorch quickly with a much better understanding of the foundations. But I have so much more to learn... in fact my model is producing this plot_loss_curves: It seems my model is doing an amazing job in the training and failing miserably in testing. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Well, I think you are overfitting your model to the training data. You can try to add more data, change the model architecture or add some dropout layers in order to solve the problem. But before doing any of these, check your optimizer function. |
Beta Was this translation helpful? Give feedback.
-
Congrats, @fabriziogiordano good starting, and keep it up. |
Beta Was this translation helpful? Give feedback.
-
Hi @fabriziogiordano, thank you for the kind words, I really appreciate it! As @Pouyaexe and @MHHamdan have said, it looks like your model is overfitting. From 04. PyTorch Custom Datasets:
Without knowing what model or data you're using, there are a few general things you can do:
These are typically known as "regularization" techniques. See more here: https://www.learnpytorch.io/04_pytorch_custom_datasets/#8-what-should-an-ideal-loss-curve-look-like |
Beta Was this translation helpful? Give feedback.
Well, I think you are overfitting your model to the training data. You can try to add more data, change the model architecture or add some dropout layers in order to solve the problem. But before doing any of these, check your optimizer function.