Hi all,
I tried to load a pre-trained ResNetModel, however Iâm getting the following weird exception:
Some weights of the model checkpoint at microsoft/resnet-50 were not used when initializing ResNetModel: [âclassifier.1.biasâ, âclassifier.1.weightâ]
- This IS expected if you are initializing ResNetModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing ResNetModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
My code for loading the model is:
model = ResNetModel.from_pretrained(âmicrosoft/resnet-50â, force_download=True)
And I wanted to use the following code as some pre-trained features:
model(images)[âpooler_outputâ] # images is a tensor of images of the correct shape
Is my code incorrect in some way?
From reading related questions I worry that somehow not all parts of the model were loaded correctly.
Thanks,
Tom