With transformer, we can do
TFViTModel.from_pretrained('google/vit-base-patch16-224-in21k')
The above vit weight files are hosted in hf-hub.
From official repo of vit provides more weigths, GitHub - google-research/vision_transformer. Weight files are saved in npz
format (link).
In transformer, is there any API to load the weights safely?
?
TFViTModel.from_pretrained('imagenet21k_2Bimagenet2012/ViT-B_16.npz')