Abstract class that provides the calculation of the error derivatives and the error accumulation, used by the derived backpropagation training algorithms.
More...
|
virtual | ~TrainingAlgorithm () |
|
virtual void | clear_derror_acc (Network &net) |
| Clears the accumulated error partial derivatives. More...
|
|
virtual double | delta (Network &net, unsigned l, unsigned n) |
| Calculates the local error gradient for each neuron. More...
|
|
virtual void | derror_acc (Network &net) |
| Accumulates the error partial derivative in respect to the weights, for each connection of the neural network. More...
|
|
virtual void | prepare (Network &net) |
| Prepares the trainer and a neural network for training. More...
|
|
virtual unsigned | train (Network &net, const Data &data, double dmse=0, unsigned max_epochs=1000)=0 |
| Adjusts the synaptic weight of an artificial neural network in order to minimize the error (MSE for standard l2 training or MAE for specific l1 training). More...
|
|
Abstract class that provides the calculation of the error derivatives and the error accumulation, used by the derived backpropagation training algorithms.
Definition at line 34 of file training.hpp.
double SuperNN::TrainingAlgorithm::delta |
( |
Network & |
net, |
|
|
unsigned |
l, |
|
|
unsigned |
n |
|
) |
| |
|
virtual |
Calculates the local error gradient for each neuron.
It's a recursive operation, where calculating the delta for a neuron will automatically calculate the delta for the neurons in the next layers that have connections with this neuron.
For an output neuron j: 
For a hidden neuron j: 
- Parameters
-
net | Neural network to be used |
l | Layer where the neuron is located |
n | Neuron position in the layer |
- Returns
- Calculated delta
Reimplemented in SuperNN::IRpropL1.
Definition at line 33 of file training.cpp.
void SuperNN::TrainingAlgorithm::prepare |
( |
Network & |
net | ) |
|
|
virtual |
Prepares the trainer and a neural network for training.
Usually this will initialize the learning rates, previous error informations and prepare the internal data structures for the training. Between a prepare() and a train(), the neural network and the trainer shouldn't be modified.
- Parameters
-
net | Neural network to be prepared |
Reimplemented in SuperNN::NBN, and SuperNN::IRprop.
Definition at line 67 of file training.cpp.