#include <MultiLayerNetwork.h>
Inheritance diagram for annie::MultiLayerNetwork:

Public Methods | |
| MultiLayerNetwork (int inputs) | |
| MultiLayerNetwork (MultiLayerNetwork &srcNet) | |
| Copy constructor, NOT YET IMPLEMENTED. More... | |
| MultiLayerNetwork (const char *filename) | |
| virtual | ~MultiLayerNetwork () |
| virtual void | addLayer (int size) |
| Adds a layer of the given size to the network. This new layer becomes the output layer. More... | |
| virtual void | connectLayer (int srcLayer) |
| virtual void | connect (int srcLayer, int srcNrn, int destNrn) |
| virtual void | connect (int srcLayer, int srcNrn, int destNrn, real weight) |
| virtual void | setBias (int layer, int nrn, real bias) |
| virtual int | getLayerCount () |
| The number of layers in the network (does not count the input layer as a layer). More... | |
| virtual VECTOR | getOutput (VECTOR &input) |
| virtual VECTOR | getOutput (real *input) |
| virtual void | train (TrainingSet &T, int epochs, real learningRate, real momentum=0.0) |
| virtual void | train (TrainingSet &T, int epochs, real learningRate, real momentum, bool verbose) |
| virtual void | save (const char *filename) |
| virtual void | setActivationFunction (int layer, ActivationFunction f, ActivationFunction df) |
| virtual const char * | getClassName () |
| Returns "MultiLayerNetwork". More... | |
Protected Methods | |
| InputLayer * | _inputLayer () |
| The input layer. More... | |
| Layer * | _outputLayer () |
| The output layer. More... | |
Protected Attributes | |
| int | _nLayers |
| std::vector< Layer * > | _layers |
| The layers. More... | |
The labels of the layers start from 0 (for the input layer) and then keep moving on. The labels of neurons in the layers is = <layer label>*Layer::MAX_LAYER_SIZE + <neuron index in layer>
All neurons in the layers are allowed to have a bias.
|
|
Create a multi-layer network.
|
|
|
Copy constructor, NOT YET IMPLEMENTED.
|
|
|
Loads a multi-layer network from the given filename.
|
|
|
|
|
|
The input layer.
|
|
|
The output layer.
|
|
|
Adds a layer of the given size to the network. This new layer becomes the output layer.
Reimplemented in annie::TwoLayerNetwork. |
|
||||||||||||||||||||
|
Connects two neurons, with the weight provided.
|
|
||||||||||||||||
|
Connects two neurons, with random weight
|
|
|
Completely connects the given layer with the layer below it, i.e., all neurons in the given layer will give their output to all the neurons in the layer below. Weights are random.
|
|
|
Returns "MultiLayerNetwork".
Implements annie::Network. Reimplemented in annie::TwoLayerNetwork. |
|
|
The number of layers in the network (does not count the input layer as a layer).
|
|
|
Wrapper function to allow getOutput() to work for an array of real as input as well. Does exactly the same thing as Network::getOutput(real*). Reimplemented from annie::Network. |
|
|
Returns the output of the network for the given input.
Implements annie::Network. |
|
|
Saves the network to the given filename. The file is a simple text file, open it up in a text editor to see the format, quite simple
Implements annie::Network. |
|
||||||||||||||||
|
Sets the activation function used by the neurons in the provided layer.
|
|
||||||||||||||||
|
Sets the bias of the given neuron.
|
|
||||||||||||||||||||||||
|
Trains the network with data from the given TrainingSet using the backpropagation algorithm.
|
|
||||||||||||||||||||
|
Trains the network with data from the given TrainingSet using the backpropagation algorithm.
|
|
|
The layers.
|
|
|
Number of layers in the network. If you derive your own network from this class, the onus of keeping _nLayers consistent lies on you! |
1.2.14 written by Dimitri van Heesch,
© 1997-2002