I’ll give you a ResNet example I use, the way should be similar to VGG:
    resnet_model = torchvision.models.resnet101(pretrained=True) 
    # Remove linear and pool layers 
    modules = list(resnet_model.children())[:-2]    # Here change to [:3]
    resnet = nn.Sequential(*modules)