(self, x: torch.Tensor, grid_size: torch.Tensor)
| 367 | return x, grid_size # x, grid_size: (f, h, w) |
| 368 | |
| 369 | def unpatchify(self, x: torch.Tensor, grid_size: torch.Tensor): |
| 370 | return rearrange( |
| 371 | x, 'b (f h w) (x y z c) -> b c (f x) (h y) (w z)', |
| 372 | f=grid_size[0], h=grid_size[1], w=grid_size[2], |
| 373 | x=self.patch_size[0], y=self.patch_size[1], z=self.patch_size[2] |
| 374 | ) |
| 375 | |
| 376 | def forward(self, |
| 377 | x: torch.Tensor, |
no outgoing calls
no test coverage detected