mmpretrain.models.utils.channel_shuffle¶
- mmpretrain.models.utils.channel_shuffle(x, groups)[source]¶
Channel Shuffle operation.
This function enables cross-group information flow for multiple groups convolution layers.
- Parameters:
x (Tensor) – The input tensor.
groups (int) – The number of groups to divide the input tensor in the channel dimension.
- Returns:
The output tensor after channel shuffle operation.
- Return type:
Tensor