ChannelShuffle
classkeras_cv.layers.ChannelShuffle(groups=3, seed=None, **kwargs)
Shuffle channels of an input image.
Input shape
3D (unbatched) or 4D (batched) tensor with shape:
(..., height, width, channels)
, in "channels_last"
format
Output shape
3D (unbatched) or 4D (batched) tensor with shape:
(..., height, width, channels)
, in "channels_last"
format
Arguments
Example
(images, labels), _ = keras.datasets.cifar10.load_data()
channel_shuffle = ChannelShuffle(groups=3)
augmented_images = channel_shuffle(images)