Interface ActivationFunction
Common base interface for all activation functions used in layers. Classes
implementing this interface should provide methods for calculating value and
first derivative of the activation function. Activation function performs
non-linear transformation of its input before its sent to layer output. First
derivative of a function shows how fast and in what direction function is
changing if its input changes, and it is used by training algorithm.
For more see
https://en.wikipedia.org/wiki/Activation_function
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidvoidvoidvoidstatic ActivationFunctioncreate(ActivationType type) Creates and returns specified type of activation function.floatgetPrime(float y) Returns the first derivative of activation function for specified output yfloatgetValue(float x) Returns the value of activation function for specified input x
-
Method Details
-
getValue
float getValue(float x) Returns the value of activation function for specified input x- Parameters:
x- input for activation- Returns:
- value of activation function
-
apply
-
apply
-
apply
-
accept
-
getPrime
float getPrime(float y) Returns the first derivative of activation function for specified output y- Parameters:
y- output of activation function- Returns:
- first derivative of activation function
-
create
Creates and returns specified type of activation function. A factory method for creating activation functions;- Parameters:
type- type of the activation function- Returns:
- returns instance of specified activation function type
-