class
RandomGaussianNoise1D
PythonApply additive zero-centered Gaussian noise.
RandomGaussianNoise1D(factor: float | tuple[float, float] = 0.1, **kwargs={})Apply additive zero-centered Gaussian noise.
Example:
x = np.sin(2*np.pi*10*np.arange(duration_size)/100) lyr = RandomGaussianNoise1D(factor=0.1) y = lyr(x)Base class: BaseAugmentation1D.
Inherited from BaseAugmentation: augment_masks(), augment_sample(), augment_targets(), batch_augment(), call().
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
factor | float | 0.1 | Standard deviation of the Gaussian noise. |
attribute
factor
Pythonfactor: tuple[float, float] = parse_factor(factor, min_value=0, max_value=None, param_name='factor')method
Generate noise tensor
get_random_transformations(input_shape: tuple[int, ...]) -> dictGenerate noise 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_samples
PythonApply sampled noise; inference bypasses sampling and application.
augment_samples(inputs) -> keras.KerasTensorApply sampled noise; inference bypasses sampling and application.
method
get_config
Pythonget_config()