Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我在使用vit模型的时候,加载vit_base_patch16_224_in21k()模型的预训练权重,显示和某些层和预训练权重不符合,怎么解决呢 #760

Open
tutoujun opened this issue Nov 20, 2023 · 1 comment

Comments

@tutoujun
Copy link

System information

  • Have I written custom code:
  • OS Platform(e.g., window10 or Linux Ubuntu 16.04):
  • Python version:
  • Deep learning framework and version(e.g., Tensorflow2.1 or Pytorch1.3):
  • Use GPU or not:
  • CUDA/cuDNN version(if you use GPU):
  • The network you trained(e.g., Resnet34 network):

Describe the current behavior

Error info / logs

@tutoujun
Copy link
Author

size mismatch for pos_embed: copying a param with shape torch.Size([1, 50, 768]) from checkpoint, the shape in current model is torch.Size([1, 197, 768]).
size mismatch for patch_embed.proj.weight: copying a param with shape torch.Size([768, 3, 32, 32]) from checkpoint, the shape in current model is torch.Size([768, 3, 16, 16]).
就是这两个层尺寸不匹配

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant