MCPcopy Create free account
hub / github.com/lingeringlight/START / __init__

Method __init__

models/vmamba.py:171–179  ·  view source on GitHub ↗
(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=None, **kwargs)

Source from the content-addressed store, hash-verified

169 """
170
171 def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=None, **kwargs):
172 super().__init__()
173 if isinstance(patch_size, int):
174 patch_size = (patch_size, patch_size)
175 self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=patch_size, stride=patch_size)
176 if norm_layer is not None:
177 self.norm = norm_layer(embed_dim)
178 else:
179 self.norm = None
180
181 def forward(self, x):
182 x = self.proj(x).permute(0, 2, 3, 1)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected