Lesson 3: PyTorch, the standard way to build and feed a network
18 min read·13 Oct 2026
Module 4 · Lesson 3 · About 45 minutes · Needs: Lesson 1 of this module (forward pass, loss, gradient, the training loop)
The situation
Dev has read your Lesson 1 notebook. He likes that every gradient can be checked by hand. He does not want to maintain it. "Nobody writes their own backward pass," he says. "Use what everyone uses, feed it data the standard way, and make it run on a GPU without editing the file."
He adds a worry: a contractor's last run died with CUDA out of memory, and nobody could say why. This lesson rebuilds the ticket network in PyTorch, the standard way, and puts numbers on memory.