So how I would do that is set up model classes as such:
Class Encoder which has its own inits and then decoder class that has its own inits
Finally you can set up container module class EncDec with inits that you specify equal inits From Encoder and decoder class contained in EncDec class.
Model = ENcDec(“whatever arguments you need”)
Optimizer = optim.adam(Model, lr = 0.0001)