ChannelShuffle layer
- 원본 링크 : https://keras.io/api/keras_cv/layers/augmentation/channel_shuffle/
- 최종 확인 : 2024-11-25
ChannelShuffle
class
keras_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
- groups: Number of groups to divide the input channels, defaults to 3.
- seed: Integer. Used to create a random seed.
Example
(images, labels), _ = keras.datasets.cifar10.load_data()
channel_shuffle = ChannelShuffle(groups=3)
augmented_images = channel_shuffle(images)