System Info
'4.57.1'
RuntimeError: Error(s) in loading state_dict for Linear:
size mismatch for bias: copying a param with shape torch.Size([1000]) from checkpoint, the shape in current model is torch.Size([6]).
Who can help?
Practically anybody, probably an easy fix.
Information
Tasks
Reproduction
model = AutoModelForImageClassification.from_pretrained("timm/efficientvit_b3.r256_in1k",num_labels=6)
Expected behavior
Whenever i pass num_labels i get this since effiicient_net was trained using 1000 labels.
timm.create_model works fine, so I assume timm integration isn't refined.
Expected behaviour that chechkpoint will be loaded using timm. Not other means.