40 Net(
const int _nLayers,
41 const int *
const _nNeurons,
73 void setInputs(
const double *_inputs,
const double scale = 1.0,
const unsigned int offset = 0,
const int n = -1);
155 double getWeights(
int _layerIndex,
int _neuronIndex,
int _weightIndex);
171 void snapWeights(
string prefix,
string _trial,
int _subject);
172 void snapWeightsMatrixFormat(
string prefix);
203 double w_learningRate = 0;
211 const double *inputs = 0;
215 double leadForwardError = 0;
219 double theLeadError = 0;
223 int midLayerIndex = 0;
227 double theLeadMidError = 0;
231 double *errorGradient = NULL;
235 double globalError = 0;
239 double echoError = 0;
243 double theLeadLocalError = 0;
void initNetwork(Neuron::weightInitMethod _wim, Neuron::biasInitMethod _bim, Neuron::actMethod _am)
Dictates the initialisation of the weights and biases and determines the activation function of the n...
void setError(double _leadError)
Sets the error at the output layer to be propagated backward.
Net is the main class used to set up a neural network used for closed-loop Deep Learning.
Definition: Net.h:30
actMethod
Options for activation functions of the neuron 0 for using the logistic function 1 for using the hype...
Definition: Neuron.h:62
void updateWeights()
Requests that all layers perform one iteration of learning.
void snapWeights(string prefix, string _trial, int _subject)
Snaps the final distribution of all weights in a specific layer, this is overwritten every time the f...
whichGradient
Options for what gradient of a chosen error to monitor.
Definition: Layer.h:44
int getnLayers()
Informs on the total number of hidden layers (excluding the input layer)
This is the class for creating layers that are contained inside the Net class.
Definition: Layer.h:27
void setInputs(const double *_inputs, const double scale=1.0, const unsigned int offset=0, const int n=-1)
Sets the inputs to the network in each iteration of learning, needs to be placed in an infinite loop.
double getOutput(int _neuronIndex)
Allows the user to access the activation output of a specific neuron in the output layer only.
double getSumOutput(int _neuronIndex)
Allows the user to access the weighted sum output of a specific neuron in output layer only.
double getLayerWeightDistance(int _layerIndex)
Allows for monitoring the weight change in a specific layer of the network.
void saveWeights()
Saves the temporal changes of all weights in all neurons into files.
int getnNeurons()
Informs on the total number of neurons in the network.
biasInitMethod
Options for method of initialising biases 0 for initialising all weights to zero 1 for initialising a...
Definition: Neuron.h:48
void propErrorBackward()
Propagates the error backward.
Net(const int _nLayers, const int *const _nNeurons, const int _nInputs, const int _subject, const string _trial)
Constructor: The neural network that performs the learning.
Layer * getLayer(int _layerIndex)
Allows Net to access each layer.
void propInputs()
It propagates the inputs forward through the network.
~Net()
Destructor De-allocated any memory.
int getnInputs()
Informs on the total number of inputs to the network.
double getWeights(int _layerIndex, int _neuronIndex, int _weightIndex)
Grants access to a specific weight in the network.
void setLearningRate(double _w_learningRate, double _b_learningRate)
Sets the learning rate.
double getWeightDistance()
Allows for monitoring the overall weight change of the network.
weightInitMethod
Options for method of initialising weights 0 for initialising all weights to zero 1 for initialising ...
Definition: Neuron.h:55
void printNetwork()
Prints on the console a full tree of the network with the values of all weights and outputs for all n...
double getGradient(Layer::whichGradient _whichGradient)
It provides a measure of how the magnitude of the error changes through the layers to alarm for vanis...