Build neural networks from the ground up — tensors and autograd, a neuron built into an nn.Module network, activations and losses, the training loop, Datasets and DataLoaders, a full train/validate/save workflow, and the techniques that make training work. Every lesson is runnable Python.
Before you start
You will run real Python with torch. A CPU install works for everything here; see pytorch.org for a CUDA/GPU build if you have one. Comfort with NumPy helps — the Data Analysis course covers it.
Tensors
A tensor is NumPy’s array with two superpowers: it runs on the GPU and tracks gradients. Create tensors, do tensor math, and move computation to the GPU.
Autograd & Gradients
Training is just following gradients downhill. PyTorch computes them for you — set requires_grad, call backward, and read the gradient. This is the engine of learning.
From a Neuron to a Network
A neuron is a weighted sum plus an activation; a network stacks them in layers. Build one by hand to see inside, then the clean way with nn.Module.
Activations & Loss Functions
Two choices shape a network: the activation that gives it non-linearity, and the loss that defines what "wrong" means. Pick the right ones for your task.
The Training Loop
Every PyTorch model trains with the same five-step loop: forward, loss, zero gradients, backward, step. Write it once and you can train anything.
Datasets & DataLoaders
Real training data won’t fit in memory and must be fed in batches. Dataset defines how to fetch one sample; DataLoader batches, shuffles, and parallelizes them.
A Full Training Workflow
Put it together: train and validate each epoch, track the loss curves, keep the best checkpoint, and save the model for inference. This is a real training script.
Making Training Work
A model that won’t learn or won’t generalize needs the right techniques: regularization against overfitting, schedules and normalization for stability, and the GPU for speed.