Open boytjj opened 8 months ago
are you sure that the updated model is "vit_huge_patch14_clip_224.laion2b_ft_in12k_in1k"? I have encountered the same problem as yours, however, when I used the weight file "pytorch_model.bin" in the link given by you, I got the following error:
RuntimeError: Error(s) in loading state_dict for VisionTransformer: size mismatch for head.weight: copying a param with shape torch.Size([1000, 1280]) from checkpoint, the shape in current model is torch.Size([1024, 1280]). size mismatch for head.bias: copying a param with shape torch.Size([1000]) from checkpoint, the shape in current model is torch.Size([1024]).
are you sure that the updated model is "vit_huge_patch14_clip_224.laion2b_ft_in12k_in1k"? I have encountered the same problem as yours, however, when I used the weight file "pytorch_model.bin" in the link given by you, I got the following error:
RuntimeError: Error(s) in loading state_dict for VisionTransformer: size mismatch for head.weight: copying a param with shape torch.Size([1000, 1280]) from checkpoint, the shape in current model is torch.Size([1024, 1280]). size mismatch for head.bias: copying a param with shape torch.Size([1000]) from checkpoint, the shape in current model is torch.Size([1024]).
have you soved the problem? i change the num_classes as 1000 and it works.
are you sure that the updated model is "vit_huge_patch14_clip_224.laion2b_ft_in12k_in1k"? I have encountered the same problem as yours, however, when I used the weight file "pytorch_model.bin" in the link given by you, I got the following error:
RuntimeError: Error(s) in loading state_dict for VisionTransformer: size mismatch for head.weight: copying a param with shape torch.Size([1000, 1280]) from checkpoint, the shape in current model is torch.Size([1024, 1280]). size mismatch for head.bias: copying a param with shape torch.Size([1000]) from checkpoint, the shape in current model is torch.Size([1024]).
have you soved the problem? i change the num_classes as 1000 and it works.
excuse me, where is the num_classes?
Hi Zheng,
python prepare_sketch.py
UserWarning: Mapping deprecated model name vit_huge_patch14_224_clip_laion2b to current vit_huge_patch14_clip_224.laion2b.
RuntimeError: Hugging Face hub model specified but package not installed.
https://github.com/huggingface/pytorch-image-models Sept 23, 2022 LAION-2B CLIP image towers supported as pretrained backbones for fine-tune or features (no classifier) vit_base_patch32_224_clip_laion2b vit_large_patch14_224_clip_laion2b vit_huge_patch14_224_clip_laion2b vit_giant_patch14_224_clip_laion2b
maybe timm update the pretrained model to vit_huge_patch14_clip_224.laion2b https://huggingface.co/timm/vit_huge_patch14_clip_224.laion2b_ft_in12k_in1k/tree/main