Modules — PyTorch 2.2 documentation
Building blocks of stateful computation.
PyTorch provides a robust library of modules and makes it simple to define new custom modules, allowing for
easy construction of elaborate, multi-layer neural networks.
https://pytorch.org/docs/stable/notes/modules.html#module-hooks