Unexpected and Missing Keys when loading InterHand2.6M weights
Hello,
I have been trying to use the weights provided in this issue with the configs files for InterHand2.6M. However, I get the following errors when I load the weights to the model:
The model and loaded state dict do not match exactly
unexpected key in source state_dict: backbone.cls_token
missing keys in source state_dict: backbone.last_norm.weight, backbone.last_norm.bias
For this specific example, I'm using ViTPose_small_interhand2d_all_256x192.py and vitpose_small_hand.pth
Any help will be appreciated. Thank you.
@Annbless
The model and loaded state dict do not match exactlyunexpected key in source state_dict: backbone.cls_token
Just do state_dict.pop('backbone.cls_token')
missing keys in source state_dict: backbone.last_norm.weight, backbone.last_norm.bias
Pass last_norm=False to ViT. I tested all models, just small and base need set last_norm=False.