towhee.models.utils.window_partition3d.window_partition¶
- towhee.models.utils.window_partition3d.window_partition(x, window_size)[source]¶
- Parameters:
x (torch.Tensor) – Tensor with size of (b, d, h, w, c). b is batch size. d is time dimension size. h and w is frame size. c is channel size.
window_size (tuple[int]) – 3d window size
- Returns:
Window partitioned tensor with size (B*num_windows, window_size*window_size, C)
- Return type:
windows (torch.Tensor)