MCPcopy Create free account
hub / github.com/buaacxf/VIPTR / forward

Method forward

modules/SVTR.py:333–338  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

331 1] // patch_size[1]
332
333 def forward(self, x):
334 B, C, H, W = x.shape
335 assert H == self.img_size[0] and W == self.img_size[1], \
336 f"Input image size ({H}*{W}) doesn't match model ({self.img_size[0]}*{self.img_size[1]})."
337 x = self.proj(x).flatten(2).permute((0, 2, 1)).contiguous()
338 return x
339
340
341class SubSample(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected