From tensors and automatic differentiation to neural network basics, techniques for stable training, CNNs and transfer learning, Attention and Transformers, faster inference, and shipping your model. Across 50 lessons, you'll get to the point where you can build a model's internals yourself, train it, and ship it as ONNX and an API. Every piece of code and output was actually run on PyTorch 2.14.0.
The 50 lessons are split into 7 chapters. We recommend going in order from chapter 1, but feel free to jump to whatever interests you.
Note: The lessons use torch, so they can't run in the browser. Create a virtual environment on your machine, run pip install torch torchvision, and try things there. You don't need a GPU. If CUDA is available you can use cuda, and on an Apple Silicon Mac you can use mps.
You'll get a handle on the two foundations of PyTorch: tensors and automatic differentiation. At the end, you'll solve linear regression with plain gradient descent, without an optimizer.
You'll run fully connected layers, activation functions, loss functions, nn.Module, the training loop, and DataLoader. At the end, you'll write one complete binary classifier, from standardization all the way to a confusion matrix.
You'll compare learning rates, optimizers, schedulers, initialization, regularization, Dropout, and normalization layers, all on the same data, and check the numbers. At the end, you'll split off validation data and implement early stopping.
From how convolution and pooling work to residual connections, data augmentation, and transfer learning. At the end, you'll fine-tune a pretrained resnet18 and measure how it compares to training from scratch.
You'll measure the limits of RNNs, write Attention yourself, and assemble a Transformer block. At the end, you'll train a character-level language model on your own Transformer and have it generate sentences.
Experiment logging, reproducibility, faster inference, saving and loading, TorchScript and torch.compile. You'll gather the tools you need to reproduce the same results again and to make models fast enough for production.
You'll export to ONNX, wrap the model in an inference API with FastAPI, and get it into a shape you can ship. Finally, you'll fold the tools from all 50 lessons into a single script and sort out where to go next.
Once you've finished all 50 lessons, learn data preprocessing and classic methods in Python & Machine Learning for Beginners, and how to call large pretrained models and build apps on them in Intro to AI App Development. To put an inference API into production, head to Intro to Shipping and Running a Service. A membership unlocks every course.