How do you evaluate a deep learning model?
Evaluating a deep learning model means measuring how well it performs on data it did not learn from directly. The goal is to estimate how well the model will generalize to new, unseen examples.
Use separate datasets
A typical workflow uses:
- Training data: used to learn the model parameters.
- Validation data: used during development to compare models, tune hyperparameters, and decide when to stop training.
- Test data: used for the final unbiased evaluation after major choices are complete.
See “What are training, validation, and test datasets?” for the dedicated explanation.
Choose metrics that match the task
The correct metric depends on what the model predicts.
For classification, common metrics include:
- Accuracy
- Precision
- Recall
- F1-score
- Confusion matrix
For regression, common metrics include:
- Mean squared error (MSE)
- Mean absolute error (MAE)
A model should not be judged by one metric blindly. For example, accuracy can be misleading when classes are highly imbalanced.
Compare training and validation behavior
During training, compare training and validation loss or metrics.
- Good training performance but much worse validation performance can indicate overfitting.
- Poor performance on both training and validation data can indicate underfitting.
See “What is overfitting in deep learning?” and “What is underfitting in deep learning?” for those concepts.
Evaluate on realistic unseen data
The final test set should represent the kind of data the model is expected to encounter in real use. If the test data is too different, too easy, or leaks information from training, the evaluation can give a misleading result.
Look beyond a single score
Depending on the application, evaluation may also consider:
- Performance across different classes or subgroups
- Robustness to noisy or difficult examples
- Inference speed and memory usage
- Calibration or confidence quality
- Failure cases and error patterns
In short, a deep learning model is evaluated by testing it on unseen data with task-appropriate metrics, checking for overfitting or underfitting, and examining whether its performance is reliable for the intended real-world use.
Learning Sequence
Deep Learning Curriculum
Explore Related Questions
Deepen your understanding across related Deep Learning topics.