random_augmentation_pipeline
Random Augmentation Pipeline Layer API
This module provides classes to build random augmentation pipeline layers.
Classes:
-
RandomAugmentation1DPipeline–Random augmentation 1D pipeline
-
RandomAugmentation2DPipeline–Random augmentation 2D pipeline
Classes
RandomAugmentation1DPipeline
RandomAugmentation1DPipeline(layers: list[BaseAugmentation1D], augmentations_per_sample: int = 1, rate: float = 1.0, batchwise: bool = False, force_training: bool = False, **kwargs)
Apply N random augmentations from a list of augmentation layers to each sample.
Parameters:
-
(layerslist[BaseAugmentation1D]) –List of augmentation layers to choose from.
-
(augmentations_per_sampleint, default:1) –Number of augmentations to apply to each sample.
-
(ratefloat, default:1.0) –Probability of applying the augmentation pipeline.
-
(batchwisebool, default:False) –If True, apply same layer to all samples in the batch.
-
(force_trainingbool, default:False) –Force training mode. Defaults to False.
Source code in neuralspot_edge/layers/preprocessing/random_augmentation_pipeline.py
Functions
batch_augment
Apply N random augmentations to each
Source code in neuralspot_edge/layers/preprocessing/random_augmentation_pipeline.py
get_config
Serializes the configuration of the layer.
Source code in neuralspot_edge/layers/preprocessing/random_augmentation_pipeline.py
RandomAugmentation2DPipeline
Source code in neuralspot_edge/layers/preprocessing/random_augmentation_pipeline.py
Functions
batch_augment
Apply N random augmentations to each
Source code in neuralspot_edge/layers/preprocessing/random_augmentation_pipeline.py
get_config
Serializes the configuration of the layer.