MCPcopy Create free account
hub / github.com/AtlasAnalyticsLab/AdaFisher / forward

Method forward

Image_Classification/src/models/swin.py:163–168  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

161 self.linear = nn.Linear(in_channels * downscaling_factor ** 2, out_channels)
162
163 def forward(self, x):
164 b, c, h, w = x.shape
165 new_h, new_w = h // self.downscaling_factor, w // self.downscaling_factor
166 x = self.patch_merge(x).view(b, -1, new_h, new_w).permute(0, 2, 3, 1)
167 x = self.linear(x)
168 return x
169
170
171class StageModule(nn.Module):

Callers

nothing calls this directly

Calls 1

linearMethod · 0.45

Tested by

no test coverage detected