MCPcopy Create free account
hub / github.com/TPCD/DCCL / forward

Method forward

model/vision_transformer.py:129–132  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

127 self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=patch_size, stride=patch_size)
128
129 def forward(self, x):
130 B, C, H, W = x.shape
131 x = self.proj(x).flatten(2).transpose(1, 2)
132 return x
133
134
135class VisionTransformer(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected