Package smile.deep.activation
Class Sigmoid
java.lang.Object
smile.deep.activation.Sigmoid
- All Implemented Interfaces:
Serializable,ActivationFunction
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Sigmoid
public Sigmoid()Constructor.
-
-
Method Details
-
name
Description copied from interface:ActivationFunctionReturns the name of activation function.- Specified by:
namein interfaceActivationFunction- Returns:
- the name of activation function.
-
f
public void f(double[] x) Description copied from interface:ActivationFunctionThe output function.- Specified by:
fin interfaceActivationFunction- Parameters:
x- the input vector.
-
g
public void g(double[] g, double[] y) Description copied from interface:ActivationFunctionThe gradient function.- Specified by:
gin interfaceActivationFunction- Parameters:
g- the gradient vector. On input, it holds W'*g, where W and g are the weight matrix and gradient of upper layer, respectively. On output, it is the gradient of this layer.y- the output vector.
-