x: B H W C
(self, x)
| 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 | |
| 587 | class LePEAttention(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected