Skip to content

Commit

Permalink
remove check for overlap between cls token and pos embed
Browse files Browse the repository at this point in the history
  • Loading branch information
staghado committed Nov 7, 2023
1 parent fcedbfd commit 6448619
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/transformers/models/vit/convert_vit_timm_to_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ def convert_vit_checkpoint(vit_name, pytorch_dump_folder_path):
if not isinstance(timm_model.patch_embed, timm.layers.PatchEmbed):
raise ValueError(f"{vit_name} is not supported in transformers because it is a hybrid ResNet-ViT.")

# non-overlapping position and class token embedding (to be added)

# get patch size and image size from the patch embedding submodule
config.patch_size = timm_model.patch_embed.patch_size[0]
config.image_size = timm_model.patch_embed.img_size[0]
Expand Down

0 comments on commit 6448619

Please sign in to comment.