Lesson 20: Capstone: Train, Evaluate and Present a Model
This is the capstone: you will train a model of your own, evaluate it honestly, and present what you found. Choose a problem you can solve with the tools of this course — for example, recognising handwritten digits, sorting images into a few categories you photograph yourself, or classifying short pieces of text. The problem should be small enough to finish, with data you can gather or download and a clear question: what should the model predict, and how will you know if it is any good?
Start by splitting your data into three sets before you train anything: training, validation and test. Keep the test set sealed until the very end. Build the simplest model that could work — a small network in PyTorch, or a pretrained network with a new classification head if you have little data — and get it training. Watch the curves: if both losses fall together, you are learning; if they split, you are memorising, and the lessons on overfitting and regularisation tell you what to try next. Change one thing at a time and keep notes on every run.
Evaluating Honestly
When you are satisfied, evaluate once on the test set and report the full picture: overall accuracy, per-class accuracy, and precision and recall for the classes where mistakes matter. Compare against a baseline — the trivial rule of always guessing the most common class — and say plainly whether your model beats it and by how much. Look at the errors themselves: collect a few examples the model got wrong and try to say why. A model that confuses two similar classes is telling you something about the data, and that observation belongs in your report.
Also check your model by group, if your data allows it. Does it work as well for every kind of image or text in your set? If one group is much worse, say so honestly rather than hiding it behind the average. A capstone that reports a weakness clearly is stronger than one that claims a perfect score.
Presenting Your Work
Your presentation should tell a story in five parts: the problem and why it matters; the data, including where it came from and how you split it; the model, including the architecture and the hyperparameters you chose; the results, with the honest numbers and the baseline comparison; and the limits, including what you would do with more data or more time. Include one figure — a training curve, a confusion matrix, or a few example predictions — and be ready to answer one hard question: what would happen if this model were deployed, and who could be harmed if it were wrong?
That question is the point of the whole course. Training a network is a technical skill; knowing when to trust it, how to test it, and when to say no is the judgement that makes the skill worth having. Good luck — and show your work.
After the Capstone
Finishing the capstone does not finish the learning; it starts the next phase of it. The models you build next will be bigger, the data messier, and the questions harder — and the habits from this course will matter more, not less. Keep the discipline of the held-out test set, the validation curve, the baseline comparison, and the honest report. Keep asking who could be harmed if the model is wrong. And keep building: the fastest way to deepen your understanding is to take a model you trained, find where it fails, and fix it — then repeat.
There is also a community to join. The field moves quickly, and the best way to keep up is to read what others have built, try their models, and share your own work with clear documentation. The tools you used in this course — Python, PyTorch, and the ideas of training, evaluation and deployment — are the same tools professionals use, and the gap between a school project and a real one is smaller than it looks. It is mostly a matter of scale, care, and the willingness to show your work.
Watch & Learn
One video to watch for this unit, from a trusted educator.
- Large Language Models explained briefly — 3Blue1Brown
A short overview of LLMs, chatbots, pretraining and transformers — a look at where the ideas of this course lead.
Key Terms
- Capstone
- A final project that brings together everything in a course.
- Test set
- Data sealed away until the end, used once to measure a model honestly.
- Baseline
- A simple rule used as a comparison point for a model's score.
- Per-class accuracy
- Accuracy reported separately for each class, so weakness on a rare class cannot hide.
- Error analysis
- Studying the examples a model got wrong to understand why it failed.
- Presentation
- A clear report of the problem, data, model, results and limits of a project.
Discussion Questions
- Why must the test set be sealed before training begins, rather than chosen at the end?
- Your model beats the baseline by a small margin. Is that a success, a failure, or neither? What would you need to decide?
- What is the hardest question someone could ask about your capstone model, and how would you answer it?
Practice Questions
- What three sets should you split your data into, and when?
- Why should you build the simplest model that could work first?
- What should an honest evaluation report, beyond overall accuracy?
- Why check performance by group in your capstone?
- What five parts should your capstone presentation cover?
Show answers
- Training, validation and test — split before you train anything, and keep the test set sealed until the end.
- Because a simple model that trains is a better starting point than a large one that does not, and it gives you a baseline to improve on.
- Per-class accuracy, precision and recall where mistakes matter, and a comparison against a trivial baseline. The errors themselves should be examined too.
- Because a model can be accurate on average while failing badly for one group, and hiding that behind the average is dishonest.
- The problem and why it matters; the data and how it was split; the model and its hyperparameters; the results with honest numbers and a baseline; and the limits, including what you would do with more data or time.