SuperNN
1.0.0
|
Base class for the standard backpropagation algorithm. More...
Public Member Functions | |
ImplBackprop () | |
virtual | ~ImplBackprop () |
virtual unsigned | train (Network &net, const Data &data, double dmse, unsigned max_epochs)=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... | |
![]() | |
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... | |
Public Attributes | |
double | eta |
Initial learning rate. More... | |
double | eta_df |
Learning rate decrease factor (must be <= 1) More... | |
double | eta_if |
Learning rate increase factor (must be >= 1) More... | |
double | eta_max |
Maximum learning rate. More... | |
double | eta_min |
Minimum learning rate. More... | |
Protected Member Functions | |
virtual void | update_eta (double mse, double last_mse) |
Calculates the new learning rate (and updates it), based on the mean squared error last change. More... | |
virtual void | update_weights (Network &net, double factor=1) |
Updates the weights using the accumulated error partial derivative calculated by derror_acc(). More... | |
![]() | |
virtual void | check (const Network &net, const Data &data) const |
Checks if the dimensions match and if the training algorithm can be used with a given network and data. More... | |
Base class for the standard backpropagation algorithm.
Definition at line 113 of file training.hpp.
SuperNN::ImplBackprop::ImplBackprop | ( | ) |
Definition at line 115 of file training.cpp.
|
virtual |
Definition at line 119 of file training.cpp.
|
pure virtual |
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).
net | Artificial neural network to be trained |
data | Training data |
dmse | Desired mean squared error (or MAE when applied). Stopping condition |
max_epochs | Maximum number of epochs to train the network. Stopping condition |
Implements SuperNN::TrainingAlgorithm.
Implemented in SuperNN::Batch, and SuperNN::Incremental.
|
protectedvirtual |
Calculates the new learning rate (and updates it), based on the mean squared error last change.
mse | Current mean squared error |
last_mse | Last mean squared error |
Definition at line 143 of file training.cpp.
|
protectedvirtual |
Updates the weights using the accumulated error partial derivative calculated by derror_acc().
net | Neural network |
factor | Factor that will be multiplied with the learning rate to adjust the weights |
Definition at line 123 of file training.cpp.
double SuperNN::ImplBackprop::eta |
Initial learning rate.
Definition at line 133 of file training.hpp.
double SuperNN::ImplBackprop::eta_df |
Learning rate decrease factor (must be <= 1)
Definition at line 121 of file training.hpp.
double SuperNN::ImplBackprop::eta_if |
Learning rate increase factor (must be >= 1)
Definition at line 124 of file training.hpp.
double SuperNN::ImplBackprop::eta_max |
Maximum learning rate.
Definition at line 130 of file training.hpp.
double SuperNN::ImplBackprop::eta_min |
Minimum learning rate.
Definition at line 127 of file training.hpp.