Build your own Neural Network
A neural network with NumPy only: forward pass, loss, backpropagation and gradient descent, trained on handwritten digits.
- Intermediate
- About 6–12 h
- 4 checkpoints
- 4 tutorials · Python
Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.
Choose a tutorialWhy build it
Frameworks hide the mathematics that makes networks learn. Deriving and coding backpropagation yourself shows what gradients, learning rates and initialisation really do.
You will be able to
- Write a multilayer perceptron's forward pass with matrices.
- Derive and code backpropagation for dense layers and common activations.
- Train with mini-batch gradient descent and read the loss curve.
- Evaluate on held-out data and diagnose over- and underfitting.
Skills it exercises
- Deep Learning Fundamentals
- Linear Algebra & Calculus for ML
- Machine Learning Fundamentals
- Model Evaluation & Validation
Recommended on Machine Learning Engineer.
How you know you are there
Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.
- Checkpoint 1Self-check
One neuron
Done when: A single neuron learns logical AND and OR, and you can explain each weight update.
- Checkpoint 2Self-check
Backpropagation
Done when: A two-layer network's gradients match numerical gradients to within 1e-6.
- Checkpoint 3Self-check
Digits
Done when: The network reaches at least 95% accuracy on the MNIST test set, trained in mini-batches.
- Checkpoint 4Self-check
Diagnose
Done when: Training and validation curves are plotted, and two learning rates and two initialisations are compared.
Stretch goals
- A convolutional layer.
- Re-implement it in PyTorch and compare speed and code size.
Step-by-step guides
Pick one in a language you know (tutorial languages: Python). They open on the author’s site.
- Python
Implement a Neural Network from Scratch(external site)
Python: a gentle first network, with every derivative explained.
- Python
A Neural Network in 11 lines of Python(external site)
Python: the shortest backpropagation example.
- Python
An Introduction to Convolutional Neural Networks(external site)
Python: the next step, convolutional networks from scratch.
- Python
Neural Networks: Zero to Hero(external site)
Video course by Andrej Karpathy, from backpropagation to GPT.
Where to go next
- Build your own Deep Learning Framework
Advanced · 20–40 h
Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.
Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.