Solved by mariosasko in post #2 
              
              
                nn.Module is a base class for other modules and its purpose is not only to store the learnable parameters (weights/biases) but hooks, buffers as well. In PyTorch, modules are not only the network layers (nn.Conv2d, nn.BatchNorm), but loss functions (nn.MSELoss) or containers (nn.Sequential), to name…