Solved by ptrblck in post #2 
              
              
                After training the models, you could create a new Generator and load the trained state_dict via: 
netG = Generator()
netG.load_state_dict(torch.load(path_to_generator_state_dict))

Afterwards, you could execute the forward pass using the same inputs as were used to train this model: 
with torch.no_g…