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