public class OutputLayer extends Layer
bias, biasGradient, biasUpdate, n, output, outputGradient, p, rmsBiasGradient, rmsWeightGradient, weight, weightGradient, weightUpdate| Constructor and Description |
|---|
OutputLayer(int n,
int p,
OutputFunction f,
Cost cost)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
backpropagate(double[] lowerLayerGradient)
Propagates the errors back to a lower layer.
|
void |
computeOutputGradient(double[] target,
double weight)
Compute the network output gradient.
|
Cost |
cost()
Returns the cost function of neural network.
|
void |
f(double[] x)
The activation or output function.
|
java.lang.String |
toString() |
computeGradient, computeGradientUpdate, getInputSize, getOutputSize, gradient, linear, mle, mse, output, propagate, rectifier, sigmoid, tanh, updatepublic OutputLayer(int n,
int p,
OutputFunction f,
Cost cost)
n - the number of neurons.p - the number of input variables (not including bias value).f - the output function.cost - the cost function.public java.lang.String toString()
toString in class java.lang.Objectpublic Cost cost()
public void f(double[] x)
Layerpublic void backpropagate(double[] lowerLayerGradient)
Layerbackpropagate in class LayerlowerLayerGradient - the gradient vector of lower layer.public void computeOutputGradient(double[] target,
double weight)
target - the desired output.weight - a positive weight value associated with the training instance.