Your First Neural Network (Keras / MNIST)
The "hello world" of deep learning
MNIST is 70,000 tiny 28×28 images of handwritten digits 0–9. Training a network to classify them is the classic first project — and Keras makes it just a handful of lines.
This page walks the five steps every deep-learning project follows: load data, build the model, compile it, fit (train), and predict. Master this loop and bigger projects are just variations.
The five steps, animated
From raw digit images to a trained classifier predicting a "7" — watch the workflow run.
The code, step by step
Train for a few epochs on mini-batches. Watch accuracy climb.
Score on the test set, then predict new digits. A basic net hits ~98%.
Things to try next
Add a hidden layer, add dropout, switch the optimizer, change the learning rate, or read the training curves to spot overfitting. Then graduate to a CNN for higher accuracy on images.