Solved by ptrblck in post #2 
              
              
                Unfortunately that’s not the case, since changing the out_features alone won’t reinitialize the internal parameters. You would have to reassign a new nn.Linear layer to self.vgg.classifier[-1] instead.