espnet2.enh.layers.swin_transformer.window_partition
Less than 1 minute
espnet2.enh.layers.swin_transformer.window_partition
espnet2.enh.layers.swin_transformer.window_partition(x, window_size)
Partition the input 2D feature into non-overlapping windows.
- Parameters:
- x – input 2D feature of shape H x W (B, H, W, C)
- window_size (Tuple *[*int , int ]) – window size
- Returns: (num_windows*B, window_size, window_size, C)
- Return type: windows