AugmentationBase<T, TData>
Base Classes · AiDotNet.Augmentation
Abstract base class for all augmentations providing common functionality.
Implements: IAugmentation<T, TData>
Known derived types: AudioAugmenterBase<T>, Brightness<T>, ColorJitter<T>, Contrast<T>, Cutout<T>, GaussianBlur<T>, GaussianNoise<T>, ImageAugmenterBase<T>, LabelMixingAugmentationBase<T, TData>, Saturation<T>, SpatialAugmentationBase<T, TData>, TabularAugmenterBase<T>, TextAugmenterBase<T>, VideoAugmenterBase<T>
For Beginners
This is the foundation that all augmentations build upon. It handles common tasks like deciding whether to apply the augmentation based on probability, tracking parameters, and ensuring augmentations behave correctly during training vs. inference.
How It Works
AugmentationBase provides:
- Probability-based application control
- Training/inference mode awareness
- Parameter serialization
- Event hooks for monitoring
Properties
| Property | Summary |
|---|---|
bool IsEnabled { get; set; } |
Gets or sets whether this augmentation is currently enabled. |
bool IsTrainingOnly { get; } |
Gets whether this augmentation should only be applied during training. |
double Probability { get; set; } |
Gets the probability of this augmentation being applied. |
string Name { get; } |
Gets the name of this augmentation. |
Methods
| Method | Summary |
|---|---|
IDictionary<string, object> GetParameters() |
Gets the parameters of this augmentation. |
TData Apply(TData data, AugmentationContext<T> context) |
Applies the augmentation to the input data. |