Solved by ptrblck in post #2 
              
              
                Based on the error message I would assume that the error is either raised in self.fc_mu or self.fc_logvar, since both are using the mentioned 3072 in_features. 
You could add debug print statements to the forward method of your model and check the shape of the input activations to these layers, whic…