I guess the following codes do the same thing, right?
pretrained_model = torchvision.models.vgg16(pretrained=True)
modified_pretrained = nn.Sequential(*list(pretrained_model.features.children())[:-1]) # to relu5_3