Module 01 β Tensors π§
The single most important object in PyTorch. Get comfortable here and the rest of your journey gets dramatically easier.
Every image, sentence, and network weight in deep learning is ultimately just a big grid of numbers. The tensor is PyTorch's container for those numbers β a supercharged cousin of the NumPy array that can live on a GPU and remember how it was computed so gradients can flow backward during training. Master the tensor and you've learned the vocabulary the entire rest of PyTorch speaks.
This module is split into four bite-sized sub-modules. Work through them in order.
π Sub-Modules
| # | Sub-Module | What you'll learn |
|---|---|---|
| 01 | Creating Tensors | Building tensors from data and factory functions, and controlling their dtype |
| 02 | Indexing & Reshaping | Slicing, indexing, reshape/view, and the crucial views-vs-copies distinction |
| 03 | Tensor Math | Element-wise ops, matrix multiplication (@), reductions, and broadcasting |
| 04 | Device Placement | Moving tensors across CPU / CUDA / MPS and bridging to and from NumPy |
π― By the end of this module, you'll be able to...
- Create tensors of any shape and data type, from scratch or from existing data.
- Slice, index, and reshape tensors confidently β without silently corrupting your data.
- Perform element-wise and matrix math, and know exactly which is which.
- Move tensors between the CPU and a GPU, and convert to/from NumPy.
β Prerequisites
Basic Python and a working PyTorch install. If you haven't set up PyTorch yet, see the Quickstart in the root README.
β‘οΈ Next up: Module 02 β Autograd, where these tensors learn to remember their own history so we can train with them.