neupy.layers.Elu

class neupy.layers.Elu[source]

The layer with the exponensial linear unit (ELU) activation function.

Parameters:
size : int or None

Layer input size. None means that layer will not create parameters and will return only activation function output for the specified input value.

weight : array-like, Tensorfow variable, scalar or Initializer

Defines layer’s weights. Default initialization methods you can find here. Defaults to HeNormal().

bias : 1D array-like, Tensorfow variable, scalar, Initializer or None

Defines layer’s bias. Default initialization methods you can find here. Defaults to Constant(0). The None value excludes bias from the calculations and do not add it into parameters list.

name : str or None

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

References

[1]http://arxiv.org/pdf/1511.07289v3.pdf

Examples

Feedforward Neural Networks (FNN)

>>> from neupy.layers import *
>>> network = Input(10) > Elu(5) > Elu(1)
Attributes:
input_shape : tuple

Returns layer’s input shape in the form of a tuple. Shape will not include batch size dimension.

output_shape : tuple

Returns layer’s output shape in the form of a tuple. Shape will not include batch size dimension.

training_state : bool

Defines whether layer in training state or not. Training state will enable some operations inside of the layers that won’t work otherwise.

parameters : dict

Parameters that networks uses during propagation. It might include trainable and non-trainable parameters.

graph : LayerGraph instance

Graphs that stores all relations between layers.

Methods

disable_training_state() Context manager that switches off trainig state.
initialize() Set up important configurations related to the layer.
activation_function(input_value)[source]
options = {'bias': Option(class_name='ParameterBasedLayer', value=ParameterProperty(name="bias")), 'name': Option(class_name='BaseLayer', value=Property(name="name")), 'size': Option(class_name='ActivationLayer', value=IntProperty(name="size")), 'weight': Option(class_name='ParameterBasedLayer', value=ParameterProperty(name="weight"))}[source]