excuse me I’m confused about questions . I need to extract the features before the classification layer as i don’t need to classify the image but need the features that help to classify only
Suppose I have a classification model called MyModel.py
After removing the output layer.
1- Should I train the class of the model on my dataset ?
2- I should get checkpoint .pth after training . Will this file be the weight ?
3- if I will train the model after remove the output layer . Should I save tensor in
def forward (self,x)

x = self.forward_features(x)

#x = self.head(x) # here I will save the tensor ??

return x

Or just the checkpoint.pth that I will get enough
4- the model comes with a .pth file ( pre-trained file) … but there is one for the classification and I shouldn’t use it . Right