Solved by yash1994 in post #2 
              
              
                Hi, 
For vgg-16 available in torchvision.models when you call list(vgg16_model.children())[:-1] it will remove whole nn.Sequential defined as following: 
Sequential(
  (0): Linear(in_features=25088, out_features=4096, bias=True)
  (1): ReLU(inplace=True)
  (2): Dropout(p=0.5, inplace=False)
  (3): L…