class
RandomChannel
PythonRandomly picks a single channel from the input samples.
RandomChannel(batchwise: bool = False, **kwargs={})Randomly picks a single channel from the input samples.
Base class: BaseAugmentation.
Inherited from BaseAugmentation: augment_masks(), augment_targets(), batch_augment(), call().
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
batchwise | bool | False | If True, grabs same channel from all samples in batch. |
attribute
batchwise
Pythonbatchwise: bool = batchwisemethod
Generate random channel index.
get_random_transformations(input_shape)Generate random channel index.
method
augment_samples
PythonAugment samples
augment_samples(inputs)Augment samples
method
augment_sample
PythonAugment a sample during training.
augment_sample(inputs) -> keras.KerasTensorAugment a sample during training.
method
get_config
Pythonget_config()