class
RandomSineWave
PythonAdds a sine wave to the input.
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
| Name | Type | Default | Description |
|---|---|---|---|
sample_rate | float | 1 | Sample rate of the input. |
frequency | float | tuple[float, float] | 100 | Frequency of the wave in Hz. If tuple, frequency is randomly picked between the values. |
amplitude | float | tuple[float, float] | 0.1 | Amplitude of the wave. If tuple, amplitude is randomly picked between the values. |
attribute
data_format
Pythondata_format: strattribute
sample_rate
Pythonsample_rate: float = sample_rateattribute
frequency
Pythonfrequency: tuple[float, float] = parse_factor(frequency, min_value=0, max_value=sample_rate / 2, param_name='frequency')attribute
amplitude
Pythonamplitude: tuple[float, float] = parse_factor(amplitude, min_value=0, max_value=None, param_name='amplitude')method
Generate noise distortion tensor
get_random_transformations(input_shape: tuple[int, int, int]) -> dictGenerate noise distortion tensor
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_shape | tuple[int, ...] | Required | Input shape. |
Returns
| Value | Type | Description |
|---|---|---|
dict | dict | Dictionary containing the noise tensor. |
method
augment_sample
PythonAugment single sample with sine wave.
augment_sample(inputs)Augment single sample with sine wave.
method
get_config
Pythonget_config()