MCPcopy
hub / github.com/lucidrains/vit-pytorch / _cct

Function _cct

vit_pytorch/cct.py:58–71  ·  view source on GitHub ↗
(num_layers, num_heads, mlp_ratio, embedding_dim,
         kernel_size=3, stride=None, padding=None,
         *args, **kwargs)

Source from the content-addressed store, hash-verified

56
57
58def _cct(num_layers, num_heads, mlp_ratio, embedding_dim,
59 kernel_size=3, stride=None, padding=None,
60 *args, **kwargs):
61 stride = default(stride, max(1, (kernel_size // 2) - 1))
62 padding = default(padding, max(1, (kernel_size // 2)))
63
64 return CCT(num_layers=num_layers,
65 num_heads=num_heads,
66 mlp_ratio=mlp_ratio,
67 embedding_dim=embedding_dim,
68 kernel_size=kernel_size,
69 stride=stride,
70 padding=padding,
71 *args, **kwargs)
72
73# positional
74

Callers 7

cct_2Function · 0.70
cct_4Function · 0.70
cct_6Function · 0.70
cct_7Function · 0.70
cct_8Function · 0.70
cct_14Function · 0.70
cct_16Function · 0.70

Calls 2

defaultFunction · 0.70
CCTClass · 0.70

Tested by

no test coverage detected