Nimrod_Daniel:

vit_base_patch16_224_in21k


function

timm.models.vit_base_patch16_224_in21k(pretrained=True)

calls for function
_create_vision_transformer

which, on it’s turn calls for
build_model_with_cfg(

This function creates instance of a class VisionTransformer(nn.Module) (currently line 230) with following (default) parameters:

img_size=224, patch_size=16, in_chans=3, num_classes=1000, embed_dim=768, depth=12, num_heads=12, mlp_ratio=4., qkv_bias=True, representation_size=None, distilled=False, drop_rate=0., attn_drop_rate=0., drop_path_rate=0., embed_layer=PatchEmbed, norm_layer=None, act_layer=None, weight_init=’’

If you don’t need pretrained model, you can create instance of this class with required parameters directly.