Introduction
In PyTorch, every building block of a network — a single layer, a group of layers, a whole model — is a module. Modules are like LEGO pieces: small ones (a linear layer, an activation) snap together into bigger ones (a block), which snap together into a full model. And every module keeps track of its own parameters, so the optimizer knows exactly what to train.