Building a PyTorch curriculum that teaches math through code, not as a prerequisite

I teach CS to underserved communities globally through a nonprofit, and I’m building a beginner-friendly PyTorch curriculum. The challenge: most PyTorch tutorials assume linear algebra and calculus fluency. I’m working on materials that build math intuition through PyTorch (using torch.autograd to visualize the chain rule, etc.) rather than as a prerequisite. Would love to hear what tripped people up when they first learned PyTorch.

For me, one of the biggest things was understanding the data flow while also tracking the dimensions after each stage. A lot of PyTorch becomes much clearer when learners can see how tensors move through the model: input shape, layer output shape, loss shape, gradient flow, etc. Once the shapes make sense, the math feels less abstract because you can connect every operation to what is happening in code.