Skip to content
heliaEDGE
Reference
HELIA

random_cutout

Signal-only occlusion with explicit half-open intervals and owned RNG.

Machine-readable model

  • interval_maskfunctionSample one interval per example; returned mask broadcasts over channels.
  • RandomCutout1DclassReplace random temporal intervals in each example during training.
  • RandomCutout2DclassReplace random rectangular regions in each example during training.
class

Replace random temporal intervals in each example during training.

helia_edge/layers/preprocessing/random_cutout.py:64

RandomCutout1D(factor=0.1, cutouts=1, fill_mode='constant', fill_value=0.0, **kwargs={})

Replace random temporal intervals in each example during training.

Regions share their positions across channels. Targets and masks remain unchanged; only signal values are occluded. Overlapping regions are allowed.

Base class: BaseAugmentation1D.

Inherited from BaseAugmentation: augment_masks(), augment_sample(), augment_targets(), batch_augment(), call().

Parameters of RandomCutout1D
NameTypeDefaultDescription
factorfloat | tuple[float, float]0.1Fractional size bounds in [0, 1] for each spatial axis. A scalar sets the upper bound with a zero lower bound; a pair sets both bounds.
cutoutsint1Nonnegative number of regions sampled per example.
fill_modestr'constant'"constant" for a fixed value or "normal" for Gaussian noise.
fill_valuefloat0.0Constant fill value, or the nonnegative standard deviation of zero-mean Gaussian noise when fill_mode is "normal".
**kwargsAny{}Base augmentation options, including seed and data_format.
Errors raised by RandomCutout1D
TypeDescription
ValueErrorSize bounds, region count, fill mode or noise deviation violate these constraints.
class

Replace random rectangular regions in each example during training.

helia_edge/layers/preprocessing/random_cutout.py:102

RandomCutout2D(factor=0.1, cutouts=1, fill_mode='constant', fill_value=0.0, **kwargs={})

Replace random rectangular regions in each example during training.

Regions share their positions across channels. Targets and masks remain unchanged; only signal values are occluded. Overlapping regions are allowed.

Base class: BaseAugmentation2D.

Inherited from BaseAugmentation: augment_masks(), augment_sample(), augment_targets(), batch_augment(), call().

Parameters of RandomCutout2D
NameTypeDefaultDescription
factorfloat | tuple[float, float]0.1Fractional size bounds in [0, 1] for each spatial axis. A scalar sets the upper bound with a zero lower bound; a pair sets both bounds.
cutoutsint1Nonnegative number of regions sampled per example.
fill_modestr'constant'"constant" for a fixed value or "normal" for Gaussian noise.
fill_valuefloat0.0Constant fill value, or the nonnegative standard deviation of zero-mean Gaussian noise when fill_mode is "normal".
**kwargsAny{}Base augmentation options, including seed and data_format.
Errors raised by RandomCutout2D
TypeDescription
ValueErrorSize bounds, region count, fill mode or noise deviation violate these constraints.