How to extract features of an image from a pretrained model