I am going through difficulties to understand this code snippet.
import torch
import torch.nn as nn
import torchvision.models as models
def ResNet152(out_features = 10):
return getattr(models, "resnet152")(pretrained=False, num_classes = out_features)
def VGG(out_features = 10):
return getattr(models, "vgg19")(pretrained=False, num_classes = out_features)
In this code segment, features for an input image is extracted by ResNet152 and Vgg19 model. But I have the question, from whether which part of these models the features are being extracted whether the part is last pooling layer or the layer before the classification layer or something else.