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

Method __init__

Image_Classification/src/models/swin.py:157–161  ·  view source on GitHub ↗
(self, in_channels, out_channels, downscaling_factor)

Source from the content-addressed store, hash-verified

155
156class PatchMerging(nn.Module):
157 def __init__(self, in_channels, out_channels, downscaling_factor):
158 super().__init__()
159 self.downscaling_factor = downscaling_factor
160 self.patch_merge = nn.Unfold(kernel_size=downscaling_factor, stride=downscaling_factor, padding=0)
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

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected