|
| enum | biasInitMethod { B_NONE = 0,
B_RANDOM = 1
} |
| | Options for method of initialising biases 0 for initialising all weights to zero 1 for initialising all weights to one 2 for initialising all weights to a random value between 0 and 1.
|
| |
| enum | weightInitMethod {
W_ZEROS = 0,
W_ONES = 1,
W_RANDOM = 2,
W_ONES_NORM = 3,
W_RANDOM_NORM = 5
} |
| | Options for method of initialising weights 0 for initialising all weights to zero 1 for initialising all weights to one 2 for initialising all weights to a random value between 0 and 1.
|
| |
| enum | actMethod { Act_Sigmoid = 1,
Act_Tanh = 2,
Act_ReLU = 3,
Act_NONE = 0
} |
| | Options for activation functions of the neuron 0 for using the logistic function 1 for using the hyperbolic tan function 2 for unity function (no activation)
|
| |
| enum | whichError { onBackwardError = 0,
onMidError = 1,
onForwardError = 2
} |
| | Options for choosing an error to monitor the gradient of 0 for monitoring the error that propagates backward 1 for monitoring the error that propagates from the middle and bilaterally 2 for monitoring the error that propagates forward.
|
| |
|
| | Neuron (int _nInputs) |
| | Constructor for the Neuron class: it initialises a neuron with specific number fo inputs to that neuron. More...
|
| |
|
| ~Neuron () |
| | Destructor De-allocated any memory.
|
| |
| void | initNeuron (int _neuronIndex, int _layerIndex, weightInitMethod _wim, biasInitMethod _bim, actMethod _am) |
| | Initialises the neuron with the given methods for weight/bias initialisation and for activation function. More...
|
| |
| void | setLearningRate (double _learningRate, double _b_learningRate) |
| | Sets the learning rate. More...
|
| |
| void | setInput (int _index, double _value) |
| | Sets the inputs to this neuron that is located in the first hidden layer. More...
|
| |
| void | propInputs (int _index, double _value) |
| | Sets the inputs to this neuron that can be located in any layer other than the first hidden layer. More...
|
| |
| int | calcOutput (int _layerHasReported) |
| | Calculates the output of the neuron by performing a weighed sum of all inputs to this neuron and activating the sum. More...
|
| |
| void | setError (double _value) |
| | Sets the error of the neuron in the first hidden layer that is to be propagated forward. More...
|
| |
| double | getError () |
| | Allows accessing the error of this neuron. More...
|
| |
|
void | updateWeights () |
| | Performs one iteration of learning, that is: it updates all the weights assigned to each input to this neuron.
|
| |
| double | doActivation (const double sum) const |
| | Performs the activation of the sum output of the neuron. More...
|
| |
| double | doActivationPrime (const double input) const |
| | Performs inverse activation on any input that is passed to this function. More...
|
| |
| void | setBackpropError (const double upstreamDeltaErrorSum) |
| | Sets the internal backprop error. More...
|
| |
| double | getOutput () |
| | Requests the output of this neuron. More...
|
| |
| double | getSumOutput () |
| | Requests the sum output of the neuron. More...
|
| |
| double | getWeights (int _inputIndex) |
| | Requests a specific weight. More...
|
| |
| double | getInitWeights (int _inputIndex) |
| | Requests a inital value of a specific weight. More...
|
| |
| double | getWeightChange () |
| | Requests for overall change of all weights contained in this neuron. More...
|
| |
| double | getMaxWeight () |
| | Requests for the maximum weights located in this neuron. More...
|
| |
| double | getMinWeight () |
| | Requests for the minimum weights located in this neuron. More...
|
| |
| double | getSumWeight () |
| | Requests for the total sum of weights located in this neuron. More...
|
| |
| double | getWeightDistance () |
| | Requests the weight distance of all weighs in this neuron. More...
|
| |
| int | getnInputs () |
| | Requests the total number of inputs to this neuron. More...
|
| |
|
void | saveWeights () |
| | Saves the temporal weight change of all weights in this neuron into a file.
|
| |
|
void | printNeuron () |
| | Prints on the console a full description of all weights, inputs and outputs for this neuron.
|
| |
| void | setWeight (int _index, double _weight) |
| | Sets the weights of the neuron. More...
|
| |
This is the class for creating neurons inside the Layer class.
This is the building block class of the network.