Intermediate level · Module 5: Evaluating Deep Learning Models · Lesson 3 of 3
Diagnosing Underfitting and Overfitting
Use training and validation curves to decide whether to make the model bigger, regularise it or get more data.
In this lesson you will
- Diagnose underfitting and overfitting from curves
- Choose the right remedy
Key concepts
training vs validation curvesunderfitting remediesoverfitting remediesdata vs model problems
The lesson
Underfitting — poor training and validation performance — calls for a larger model, longer training or better features.
Overfitting — high training but lower validation performance — calls for more or better data, augmentation, regularisation or a smaller model.
If validation is good but the field test is poor, the problem is the data's coverage, not the model: collect data from the missing conditions.
Step by step
- Plot training and validation curves for both models.
- Diagnose each model.
- Apply one remedy and retrain.
- Compare the curves.
My deep learning model is disappointing — what now?
Use training, validation and field results to find out whether the model, the training or the data is the problem.
- YesUnderfitting: train longer, raise the learning rate a little, use a larger or pre-trained model — and check the labels and data loading for bugs.
- NoIs validation accuracy much lower than training accuracy?
- YesOverfitting: add realistic augmentation, dropout or weight decay, use early stopping, or collect more varied data.
- NoIs the field or test performance much lower than validation?
- YesData mismatch or leakage: check for near-duplicates across splits and collect training data from the real conditions (phones, lighting, places).
- NoPerformance is consistent. Use error analysis to find the most common remaining mistakes and target them with data or labels.
- Yes
- Yes
Notes
Always look at examples, not just numbers: a few dozen misclassified images often explain more than any metric.
Practice activity
Apply the diagnosis to the project's models and complete the evaluation report.
Expected result: A diagnosis per model, one tested remedy and a final recommendation.
Check your understanding
-
Which remedy suits overfitting?
Show answer
More data, augmentation, regularisation or a smaller model.
-
What does good validation but poor field performance suggest?
Show answer
The training data does not cover real conditions.
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.