public class HiddenLayer extends Layer
bias, biasGradient, biasUpdate, n, output, outputGradient, p, rmsBiasGradient, rmsWeightGradient, weight, weightGradient, weightUpdate
Constructor and Description |
---|
HiddenLayer(int n,
int p,
ActivationFunction f)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
backpropagate(double[] lowerLayerGradient)
Propagates the errors back to a lower layer.
|
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, update
public HiddenLayer(int n, int p, ActivationFunction f)
n
- the number of neurons.p
- the number of input variables (not including bias value).f
- the activation function.public java.lang.String toString()
toString
in class java.lang.Object
public void f(double[] x)
Layer
public void backpropagate(double[] lowerLayerGradient)
Layer
backpropagate
in class Layer
lowerLayerGradient
- the gradient vector of lower layer.