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

Method forward

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

Source from the content-addressed store, hash-verified

369 self.act = None
370
371 def forward(self, x):
372
373 if self.types == 'Pool':
374 x1 = self.avgpool(x)
375 x2 = self.maxpool(x)
376 x = (x1 + x2) * 0.5
377 out = self.proj(x.flatten(2).permute((0, 2, 1))).contiguous()
378 else:
379 x = self.conv(x)
380 out = x.flatten(2).permute((0, 2, 1)).contiguous()
381 out = self.norm(out)
382 if self.act is not None:
383 out = self.act(out)
384
385 return out
386
387
388class SVTRNet(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected