Solved by JuanFMontesinos in post #4 
              
              
                Classes have attributes (anything you call by self.whatever). 
Pytorch is coded such that when you set 
self.anything= X 
It inspects that X. If it’s a nn.Module or a tensor (a layer or a pytorch tensor) it keeps track of it. 
Then when you save the model, pytorch iterates over all the layers nor yo…