neupy.layers.stochastic module

class neupy.layers.stochastic.Dropout[source]

Dropout layer

Parameters:

proba : float

Fraction of the input units to drop. Value needs to be between 0 and 1.

name : str or None

Layer’s identifier. If name is equal to None than name will be generated automatically. Defaults to None.

Attributes

input_shape (tuple) Layer’s input shape.
output_shape (tuple) Layer’s output shape.
training_state (bool) Defines whether layer in training state or not.
parameters (dict) Trainable parameters.
graph (LayerGraph instance) Graphs that stores all relations between layers.

Methods

disable_training_state() Swith off trainig state.
initialize() Set up important configurations related to the layer.
options = {'name': Option(class_name='BaseLayer', value=Property(name="name")), 'proba': Option(class_name='Dropout', value=ProperFractionProperty(name="proba"))}[source]
output(input_value)[source]

Return output base on the input value.

Parameters:input_value
proba = None[source]
class neupy.layers.stochastic.GaussianNoise[source]

Add gaussian noise to the input value. Mean and standard deviation are layer’s parameters.

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 identifier. If name is equal to None than name will be generated automatically. Defaults to None.

Attributes

input_shape (tuple) Layer’s input shape.
output_shape (tuple) Layer’s output shape.
training_state (bool) Defines whether layer in training state or not.
parameters (dict) Trainable parameters.
graph (LayerGraph instance) Graphs that stores all relations between layers.

Methods

disable_training_state() Swith off trainig state.
initialize() Set up important configurations related to the layer.
mean = None[source]
options = {'std': Option(class_name='GaussianNoise', value=NumberProperty(name="std")), 'name': Option(class_name='BaseLayer', value=Property(name="name")), 'mean': Option(class_name='GaussianNoise', value=NumberProperty(name="mean"))}[source]
output(input_value)[source]

Return output base on the input value.

Parameters:input_value
std = None[source]