Solved by ptrblck in post #3 
              
              
                One issue with the code is that you are re-initializing some layers on your forward method. 
You would usually initialize all modules in the __init__ method and assign them to internal attributes, as you have done with self.block1 etc. 
However, all nn.Conv2d and nn.ConvTranspose2d calls in your for…