Why my test_loss and test_acc are not improving per epoch #1080
Replies: 3 comments
-
@mrdbourke Please don't kill me for tagging you directly but scrambling for help. Scratching my head over this for the last 3 days and couldn't figure what's wrong with my test_loss and test_Acc. Can you (or any other expert if reading this) please help. Many thanks! |
Beta Was this translation helpful? Give feedback.
-
Hey @SailSabnis , Great question! Your code looks pretty good to me. And it looks like your results are similar to what the results are in the example notebook:
See here: https://www.learnpytorch.io/04_pytorch_custom_datasets/#77-train-and-evaluate-model-0 It seems that the TinyVGG model isn't capable of forming a great representation with the current data setup/training setup we have (this is okay, sometimes models don't have the parameters/data to learn, we'll improve results in the Transfer Learning section: https://www.learnpytorch.io/06_pytorch_transfer_learning/). Your results look similar to the example results too: If I've misunderstood your question, please feel free to add more information/link to a video/timestamp you're working through so I can see the full code (e.g. what data is being used). Best, Daniel |
Beta Was this translation helpful? Give feedback.
-
Hi all.
Struggling with this one. I am sure this seems pretty basic and would appreciate any help.
For the FoodVisionMini model using 3 classes (pizza, sushi, steak) example - my train_loss and test_acc seem to remain constant across all epochs. See Screenshot 1 -
Screenshot 1 -
Here's my train_step and test_step function along with acc function and a train_func that combines both train and test step-
Screenshot 2 - (Defining TinyVGG model)
Screenshot 3 - (accuracy function, train_step and test_step function)
Screenshot 4 - (train function combining train_step and test_step and running 5 epochs)
Beta Was this translation helpful? Give feedback.
All reactions