Hello, I am trying to implement image classification based on feature vector. I followed this tutorial and added
model_conv = models.resnet18(pretrained=True)
feature_extractor = torch.nn.Sequential(*list(model_conv.children())[:-1])
x = torch.randn([1,3,224,224])
output1 = feature_extractor(x)
print(output1)
and got a result of 512 output. My questions are
βAre there outputs are features of the trained model?β
if I want to extract features of one image should I follow the same procedure?
Thank you