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

Method forward

modules/VIPTRv1.py:575–584  ·  view source on GitHub ↗

x: B H W C

(self, x)

Source from the content-addressed store, hash-verified

573 self.norm = nn.LayerNorm(out_dim)
574
575 def forward(self, x):
576 '''
577 x: B H W C
578 '''
579 x = x.permute(0, 3, 1, 2).contiguous() # (b c h w)
580 x = self.reduction(x) # (b oc oh ow)
581 x = x.permute(0, 2, 3, 1).contiguous() # (b oh ow oc)
582 x = self.norm(x)
583
584 return x
585
586
587class LePEAttention(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected