Thanks … i think the problem happen when tried to delete the head layer from the model using this line

model = torch.nn.Sequential(*(list(model.children())[:-1]))

when i comment out this line i got the tensor of the image without problem but i need to remove the classification layer as i need the features before classification … what i should do, please