public abstract class Neurons
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Neurons.Input
Input layer of the Neural Network
This layer is different from other layers as it has no incoming weights,
but instead gets its activation values from the training points.
|
static class |
Neurons.Linear |
static class |
Neurons.Maxout |
static class |
Neurons.MaxoutDropout |
static class |
Neurons.Output |
static class |
Neurons.Rectifier |
static class |
Neurons.RectifierDropout |
static class |
Neurons.Softmax |
static class |
Neurons.Tanh |
static class |
Neurons.TanhDropout |
Modifier and Type | Field and Description |
---|---|
double[] |
_a
Layer state (one per neuron): activity, error
|
double[] |
_b |
protected Dropout |
_dropout
For Dropout training
|
double[] |
_e
Layer state (one per neuron): activity, error
|
Neurons |
_previous
References for feed-forward connectivity
|
float[] |
_w |
static DocGen.FieldDoc[] |
DOC_FIELDS |
protected NN |
params
Parameters (deep-cloned() from the user input, can be modified here, e.g.
|
protected int |
units |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
bprop()
Back propagation
|
protected abstract void |
fprop(long seed,
boolean training)
Forward propagation
|
void |
init(Neurons[] neurons,
int index,
NN p,
NNModel.NNModelInfo minfo,
boolean training)
Initialization of the parameters and connectivity of a Neuron layer
|
double |
momentum(long n)
The momentum - real number in [0, 1)
Can be a linear ramp from momentum_start to momentum_stable, over momentum_ramp training samples
|
double |
rate(long n)
The learning rate
|
java.lang.String |
toString() |
public static DocGen.FieldDoc[] DOC_FIELDS
protected int units
protected NN params
public transient double[] _a
public transient double[] _e
public Neurons _previous
public float[] _w
public double[] _b
protected Dropout _dropout
public java.lang.String toString()
toString
in class java.lang.Object
public final void init(Neurons[] neurons, int index, NN p, NNModel.NNModelInfo minfo, boolean training)
neurons
- Array of all neuron layers, to establish feed-forward connectivityindex
- Which layer am I?p
- User-given parameters (Job parental object hierarchy is not used)minfo
- Model information (weights/biases and their momenta)training
- Whether training is done or just testing (no need for dropout)protected abstract void fprop(long seed, boolean training)
seed
- For seeding the RNG inside (for dropout)training
- Whether training is done or just testing (no need for dropout)protected abstract void bprop()
public double rate(long n)
n
- The number of training samples seen so far (for rate_annealing > 0)public double momentum(long n)
n
- The number of training samples seen so far