Home › Courses › Deep Learning from Scratch
Build your own mini PyTorch: autograd, layers and training loops from the ground up
4 phases. 13 lessons. 13 labs. 1 capstone. Neural networks from the ground up: the perceptron, multi-layer networks, backpropagation by hand, activation and loss functions, optimizers, regularization, and a small deep learning framework you build yourself before you touch PyTorch. You build an autograd engine and a training loop that trains a real model, then move to PyTorch and JAX knowing what they do underneath.
4 phases · 13 lessons · 13 labs · 1 capstone
Take Core ML: Algorithms from Scratch first — this course builds on it.
NumPy · PyTorch · JAX · Matplotlib
It's building neural networks from the ground up — starting with a single perceptron, adding layers, implementing backpropagation by hand, building an autograd engine, and constructing a mini training framework — all before using PyTorch. By the time you reach PyTorch, you've already built a simpler version of it yourself.
You design neural network architectures, write training loops, and debug training dynamics. When something goes wrong — loss explodes, gradients vanish, the model won't learn — you diagnose the issue from first principles because you built the mechanisms yourself. When you need a custom layer or loss function, you implement it without waiting for PyTorch to add it.
Every company doing serious ML uses PyTorch, but most engineers treat it as a black box. The engineer who built an autograd engine from scratch is the one who can debug production training issues, implement custom architectures from papers, and optimize training speed. That's the engineer who gets the senior role.
It is not a PyTorch tutorial. You'll use PyTorch in Phase 4, but only after building a simpler version of it yourself. It is not a computer vision or NLP course — those are the next courses in the chain. This course is purely about how neural networks learn and how to build the machinery that trains them.
Yes. This course builds on the gradient descent and evaluation work in Core ML, applying the same optimization ideas to neural networks instead of classical algorithms.
Because PyTorch is an autograd engine with a training loop, and once you've built one yourself it stops being magic. When training breaks, you can tell whether it's the data, the architecture, the optimizer or the framework. When you need custom gradients or an unusual architecture, you know how to write them.
ML & AI Engineering covers deep learning in 7 lessons as part of a broader curriculum, enough to use PyTorch well. This course spends 13 lessons building backpropagation from scratch, implementing an autograd engine and constructing a small framework before PyTorch appears. Using PyTorch versus understanding what it is.
A working mini deep learning framework with autograd, layers, optimizers and a training loop, and PyTorch and JAX read through the framework you built.
Backpropagation · Learning Rate
Core ML: Algorithms from Scratch · Transformers & LLMs from Scratch · Computer Vision Engineering · NLP & Speech Processing · Generative AI Fundamentals · ML & AI Engineering
Create a free account — the opening phases of 29 of 35 courses, and the first lesson of every phase, are free, no credit card. Or see Pro pricing.
All courses · Pricing · About · FAQ · Glossary · Projects by topic