MixupAugmentation¶
Interpolate between training exemplars, including class labels.
This data augmentation interpolates linearly between pairs of training exemplars, where the interpolation parameter is drawn from a Beta distribution with the given mixup parameter. This is a general-purpose augmentation that can be used on any dataset and domain. Warning: if your data has mor than 2 classes, the labels must be one-hot encoded. Like most augmentation nodes, this node does not by itself amplify the amount of data, which therefore has to be done beforehand using, for example, the RepeatAlongAxis node. Note that, unless you shuffle the data immediately following RepeatAlongAxis, the shuffle option in this node must remain enabled, even if your mini-batches prior to RepeatAlongAxis are already shuffled. When shuffling is enabled, you need to wire in a random seed (for example using the DrawRandomSeed node, see docs for more info) to ensure reproducibility. Version 0.5.1
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: INOUT
seed¶
Random seed for deterministic results.
- verbose name: Seed
- default value: None
- port type: DataPort
- value type: AnyArray (can be None)
- data direction: IN
is_training¶
Whether the node is used in training mode.
- verbose name: Is Training
- default value: None
- port type: DataPort
- value type: bool (can be None)
- data direction: IN
alpha¶
Mixup parameter. This parameter controls how far generated samples may deviate from the original data; the blend value is drawn from a Beta distribution with parameter (alpha, alpha). A value of 0 means no deviation from training exemplars, small positive values between 0.2 and 0.4 have been shown to work well in practice, and large positive values (up to infinity) can work on xsome datasets but generally tend to lead to underfitting.
- verbose name: Mixup Parameter
- default value: 0.2
- port type: FloatPort
- value type: float (can be None)
shuffle¶
Whether to shuffle the data before applying the augmentation. This can be disabled if the data has already been shuffled. Note, however, that the common pattern of duplicating shuffled data and then augmenting via this node does NOT qualify as a proper shuffle since the MixUp operation acts on consecutive pairs of data (wrapped around at the end). If shuffling is enabled, a random seed must be provided.
- verbose name: Shuffle
- default value: True
- port type: BoolPort
- value type: bool (can be None)
bypass¶
Whether to bypass the augmentation and pass the input data through unchanged.
- verbose name: Bypass
- default value: False
- port type: BoolPort
- value type: bool (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)