random_sine_wave
Random Sine Wave Layer API
This module provides classes to build random sine wave layers.
Classes:
-
RandomSineWave–Random sine wave
Classes
RandomSineWave
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.
Parameters:
-
(sample_ratefloat, default:1) –Sample rate of the input.
-
(frequencyfloat | tuple[float, float], default:100) –Frequency of the wave in Hz. If tuple, frequency is randomly picked between the values.
-
(amplitudefloat | tuple[float, float], default:0.1) –Amplitude of the wave. If tuple, amplitude is randomly picked between the values.
Source code in neuralspot_edge/layers/preprocessing/random_sine_wave.py
Functions
get_random_transformations
Generate noise distortion tensor
Parameters:
Returns:
-
dict(dict) –Dictionary containing the noise tensor.
Source code in neuralspot_edge/layers/preprocessing/random_sine_wave.py
augment_sample
Augment single sample with sine wave.