Interface ActivationFunction
- All Superinterfaces:
 Serializable
The activation function in hidden layers.
- 
Method Summary
Modifier and TypeMethodDescriptionvoidThe output function.voidThe gradient function.static ActivationFunctionleaky()The leaky rectifier activation functionmax(x, 0.01x).static ActivationFunctionleaky(double a) The leaky rectifier activation functionmax(x, ax)where0 <= a < 1.static ActivationFunctionlinear()Linear/Identity activation function.name()Returns the name of activation function.static ActivationFunctionThe rectifier activation functionmax(0, x).static ActivationFunctionsigmoid()Logistic sigmoid function: sigmoid(v)=1/(1+exp(-v)).static ActivationFunctiontanh()Hyperbolic tangent activation function. 
- 
Method Details
- 
name
 - 
f
 - 
g
 - 
linear
Linear/Identity activation function.- Returns:
 - the linear activation function.
 
 - 
rectifier
The rectifier activation functionmax(0, x). It is introduced with strong biological motivations and mathematical justifications. The rectifier is the most popular activation function for deep neural networks. A unit employing the rectifier is called a rectified linear unit (ReLU).ReLU neurons can sometimes be pushed into states in which they become inactive for essentially all inputs. In this state, no gradients flow backward through the neuron, and so the neuron becomes stuck in a perpetually inactive state and "dies". This is a form of the vanishing gradient problem. In some cases, large numbers of neurons in a network can become stuck in dead states, effectively decreasing the model capacity. This problem typically arises when the learning rate is set too high. It may be mitigated by using leaky ReLUs instead, which assign a small positive slope for
x < 0however the performance is reduced.- Returns:
 - the rectifier activation function.
 
 - 
leaky
The leaky rectifier activation functionmax(x, 0.01x).- Returns:
 - the leaky rectifier activation function.
 
 - 
leaky
The leaky rectifier activation functionmax(x, ax)where0 <= a < 1. By defaulta = 0.01. Leaky ReLUs allow a small, positive gradient when the unit is not active. It has a relation to "maxout" networks.- Parameters:
 a- the parameter of leaky ReLU.- Returns:
 - the leaky rectifier activation function.
 
 - 
sigmoid
Logistic sigmoid function: sigmoid(v)=1/(1+exp(-v)). For multi-class classification, each unit in output layer corresponds to a class. For binary classification and cross entropy error function, there is only one output unit whose value can be regarded as posteriori probability.- Returns:
 - the logistic sigmoid activation function.
 
 - 
tanh
Hyperbolic tangent activation function. The tanh function is a rescaling of the logistic sigmoid, such that its outputs range from -1 to 1.- Returns:
 - the hyperbolic tangent activation function.
 
 
 -