Solved by ashwin.raju93 in post #4 
              
              
                so you just want to change the last layer of vgg19 ? 
you can do like this. 
old_classifier = list(model_conv.classifier.children()) # get the classifier part alone
old_classifier.pop() # remove the last layer
old_classifier.append(nn.Linear(4096,2)) # add a new layer
model_conv.classifier = nn.Sequ…