MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / vit_base

Function vit_base

selfpatch_vision_transformer.py:356–360  ·  view source on GitHub ↗
(patch_size=16, **kwargs)

Source from the content-addressed store, hash-verified

354 return model
355
356def vit_base(patch_size=16, **kwargs):
357 model = VisionTransformer(
358 patch_size=patch_size, embed_dim=768, depth=12, num_heads=12, mlp_ratio=4,
359 qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), **kwargs)
360 return model
361
362class SelfPatchHead(nn.Module):
363 def __init__(self, in_dim, num_heads, k_num):

Callers

nothing calls this directly

Calls 1

VisionTransformerClass · 0.85

Tested by

no test coverage detected