Solved by ptrblck in post #4 
              
              
                Based on the error message I guess that the number of input features in self.classifier doesn’t match the feature dimension for x. 
Print the shape of x after using torch.cat and before feeding it to self.classifier and adapt the in_features if necessary.