class
RandomChoice
PythonChoose one layer for a whole batch; branches must have compatible outputs.
RandomChoice(layers: list[keras.Layer], batchwise: bool = True, **kwargs={})Choose one layer for a whole batch; branches must have compatible outputs.
Per-example layer choice was never implemented and remains unsupported.
The next-major default is the supported batchwise=True mode.
Base class: BaseAugmentation.
Inherited from BaseAugmentation: augment_masks(), augment_sample(), augment_samples(), augment_targets(), get_random_transformations().
attribute
layers
Pythonlayers = layersattribute
batchwise
Pythonbatchwise = batchwisemethod
build
Pythonbuild(input_shape)method
batch_augment
Pythonbatch_augment(inputs, transformations=None)method
call
Pythoncall(inputs, training=None, transformations=None)method
get_config
Pythonget_config()method
from_config
Pythonfrom_config(config)classmethod