Skip to content
heliaEDGE
Reference
HELIA

random_sine_wave

This module provides classes to build random sine wave layers.

Classes

Name Description
RandomSineWave Random sine wave

Machine-readable model

class

Adds a sine wave to the input.

helia_edge/layers/preprocessing/random_sine_wave.py:18

RandomSineWave(
sample_rate: float = 1,
frequency: float | tuple[float, float] = 100,
amplitude: float | tuple[float, float] = 0.1,
**kwargs={},
)

Adds a sine wave to the input.

Base class: BaseAugmentation1D.

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

Parameters of RandomSineWave
NameTypeDefaultDescription
sample_ratefloat1Sample rate of the input.
frequencyfloat | tuple[float, float]100Frequency of the wave in Hz. If tuple, frequency is randomly picked between the values.
amplitudefloat | tuple[float, float]0.1Amplitude of the wave. If tuple, amplitude is randomly picked between the values.
method

Generate noise distortion tensor

helia_edge/layers/preprocessing/random_sine_wave.py:46

get_random_transformations(input_shape: tuple[int, int, int]) -> dict

Generate noise distortion tensor

Parameters of get_random_transformations
NameTypeDefaultDescription
input_shapetuple[int, ...]RequiredInput shape.
Returns of get_random_transformations
ValueTypeDescription
dictdictDictionary containing the noise tensor.