Solved by justusschock in post #2 
              
              
                Yes it is possible. In general: nearly everything that can be done with classes can be done by inheriting torch.nn.Module and defining the missing things yourself. 
Whether it is good practice is hard to tell. If it helps, I can ensure you, that I have done something similar quite often as it is one…