The model lab · Part 7
How do you train a neural network?
You are the teacher: label the drawings, then watch the model turn your answers into weights.
Teach the model, one card at a time
Each card is an E or a 3. Swipe it left for E, right for 3, or up to delete it from the training set, or use the buttons under the deck. The model only learns the labels you give it, and you can start training with as few as you like.
Or label them yourself below. That is the actual lesson.
Label the training set
0 of 50 labelled
Clean 3
Swipe left for E, right for 3, up to delete it from the training set — or use the buttons.
Labelled E (0)
Nothing here yet.
Labelled 3 (0)
Nothing here yet.
Add your own images
Draw an E, a 3, or anything in between on the same 8-by-8 grid the training set uses. If you know what you drew, label it right here and it joins that bucket; if you'd rather judge it like the others, send it to the deck and swipe. Either way it trains alongside the generated drawings.
Start training
Gradient descent adjusts all 64 weights after seeing every drawing you labelled. You can train on as few as one card. A lopsided set makes a lopsided model, which is a lesson in itself.
Label at least one drawing before training.
Training starts with examples
A cannot learn what an E or a 3 is until somebody supplies examples. Here, each 8×8 drawing is deliberately a little different, like handwriting from different people.
Your labels become the lesson
The pictures do not come with answers attached. The buckets are the answers. When you put a picture in the E bucket, you are telling the model to make that output more likely next time it sees a similar pattern.
Gradient descent changes the weights
compares each guess with your label, measures how wrong it was, then nudges all 64 weights a little. The number falls when those small nudges make the model agree with more of your examples.
A backwards lesson still teaches something
Try inverting every label before training. The model is not secretly aware that a shape looks like a 3. It learns the rule in its examples, so reversed teaching produces a reversed classifier.
Put it to use
Next up: How do LLMs predict the next word?