neupy.layers.GaussianNoise

class neupy.layers.GaussianNoise[source]

Add gaussian noise to the input value. Mean and standard deviation of the noise can be controlled from the layers parameters.

It’s important to note that output from the layer is controled by the training parameter in the output method. Layer will be applied only in cases when training=True propagated through the network, otherwise it will act as an identity.

Parameters:
std : float

Standard deviation of the gaussian noise. Values needs to be greater than zero. Defaults to 1.

mean : float

Mean of the gaussian noise. Defaults to 0.

name : str or None

Layer’s name. Can be used as a reference to specific layer. When value specified as None than name will be generated from the class name. Defaults to None

Examples

>>> from neupy.layers import *
>>> network = join(
...     Input(10),
...     Relu(5) >> GaussianNoise(std=0.1),
...     Relu(5) >> GaussianNoise(std=0.1),
...     Sigmoid(1),
... )
>>> network
(?, 10) -> [... 6 layers ...] -> (?, 1)
Attributes:
variables : dict

Variable names and their values. Dictionary can be empty in case if variables hasn’t been created yet.

Methods

variable(value, name, shape=None, trainable=True) Initializes variable with specified values.
get_output_shape(input_shape) Computes expected output shape from the layer based on the specified input shape.
output(*inputs, **kwargs) Propagetes input through the layer. The kwargs variable might contain additional information that propages through the network.
mean = None[source]
options = {'mean': Option(class_name='GaussianNoise', value=NumberProperty(name="mean")), 'name': Option(class_name='BaseLayer', value=Property(name="name")), 'std': Option(class_name='GaussianNoise', value=NumberProperty(name="std"))}[source]
output(input_value, training=False)[source]
std = None[source]