(self, x)
| 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 | |
| 388 | class SVTRNet(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected