Solved by Nikronic in post #8 
              
              
                Yes, there may be some other problems with your defined network. Because in almost all of the VAE papers, Conv2d and TransposedConv2d has been used for changing channel size and dimension at the same time and it will work fine if training procedure goes well. 
The reason is that maxpooling is a simp…