google-research / vision_transformer

Apache License 2.0
9.74k stars 1.24k forks source link

KeyError: 'embedding/kernel is not a file in the archive' #300

Open susong521 opened 4 months ago

susong521 commented 4 months ago

I encountered this issue when I was loading the pretrained weights from timm. The weights were downloaded from huggingface.co. Specifically,self.image_model = timm.create_model("vit_base_patch32_224", pretrained=True,pretrained_cfg_overlay=dict( file='vit-base-patch32-224/pytorch_model.bin')) How can fix it? I will appreciate it if you can solve this problem.

yangyuwenyang commented 1 month ago

I meet this problem, too