Solved by ptrblck in post #7 
              
              
                Make sure to replace the last linear layer with a new nn.Linear using out_features = 39. 
Different models use different attributes for the last layer(s), e.g. model.fc, model.classifier etc.