#include <neural.h>
Inheritance diagram for fl::NeuronBackprop:

Public Methods | |
| NeuronBackprop () | |
| virtual void | startCycle () |
| Clear latches. | |
| float | getActivation () |
| Add up net activation level from all synapses. | |
| virtual float | getOutput () |
| Compute output of squashing function. Draws on net activation. | |
| virtual float | getDelta () |
| Collect error from subsequent Neurons via back-propogation. | |
| float | getError () |
| Compute the error signal based on delta. | |
| virtual void | learn () |
| Request all Synapses feeding this Neuron to adjust their weights according to the error signal. | |
Public Attributes | |
| float | activation |
| net activation level (before squashing function) for current cycle. Before it is calculated, its value is nan. | |
| float | delta |
| error signal for current cycle. Before it is calculated, its value is nan. | |
To construct an NN that works on real world data and has useful output, you should create two subclasses of this class: "NeuronInput" -- Computes an appropriate output level based on current input datum. Only need to override getOutput(). No need for afferent Synapses. "NeuronOutput" -- Computes an appropriate error signal based on the expected value from a training datum. Only need to override getDelta().
Note that hidden layers in an NN would be constructed directly out of instances of this class or some specialized subclass. An example of specialization is the NeuronDelay below.
|
|
|
|
|
Add up net activation level from all synapses.
|
|
|
Collect error from subsequent Neurons via back-propogation.
Reimplemented in fl::NeuronDelay, fl::NeuronOutputVector, and NeuronOutput. |
|
|
Compute the error signal based on delta.
|
|
|
Compute output of squashing function. Draws on net activation.
Reimplemented in fl::NeuronDelay, fl::NeuronInputVector, and NeuronInput. |
|
|
Request all Synapses feeding this Neuron to adjust their weights according to the error signal.
|
|
|
Clear latches.
Reimplemented in fl::NeuronDelay. |
|
|
net activation level (before squashing function) for current cycle. Before it is calculated, its value is nan.
|
|
|
error signal for current cycle. Before it is calculated, its value is nan.
|
1.2.18