(self, x)
| 243 | self.proj = conv_1xnxn(in_chans, embed_dim, kernel_size=patch_size[0], stride=patch_size[0]) |
| 244 | |
| 245 | def forward(self, x): |
| 246 | B, C, T, H, W = x.shape |
| 247 | # FIXME look at relaxing size constraints |
| 248 | # assert H == self.img_size[0] and W == self.img_size[1], \ |
| 249 | # f"Input image size ({H}*{W}) doesn't match model ({self.img_size[0]}*{self.img_size[1]})." |
| 250 | x = self.proj(x) |
| 251 | B, C, T, H, W = x.shape |
| 252 | x = x.flatten(2).transpose(1, 2) |
| 253 | x = self.norm(x) |
| 254 | x = x.reshape(B, T, H, W, -1).permute(0, 4, 1, 2, 3).contiguous() |
| 255 | return x |
| 256 | |
| 257 | |
| 258 | @MODEL_REGISTRY.register() |
nothing calls this directly
no outgoing calls
no test coverage detected