#include <TwoLayerNetwork.h>
Inheritance diagram for TwoLayerNetwork:
Public Member Functions | |
TwoLayerNetwork (uint inputs, uint hidden, uint outputs) | |
Creates a two layer network. | |
TwoLayerNetwork (const char *filename) | |
Loads a two-layer network from a file. | |
virtual void | connect2in (int input, int hidden) |
Connects an input and a hidden neuron with a random weight. | |
virtual void | connect2in (int input, int hidden, real weight) |
Connects an input and a hidden neuron with the given weight. | |
virtual void | connect2out (int hidden, int output) |
Connects a hidden and an output neuron with a random weight. | |
virtual void | connect2out (int hidden, int output, real weight) |
Connects a hidden and an output neuron with the given weight. | |
virtual void | connectAll () |
Completely connects the network. | |
virtual void | addLayer (int size) |
Overrides MultiLayerNetwork::addLayer() so that it cannot be done. | |
virtual const char * | getClassName () |
Returns "TwoLayerNetwork". |
This is basically a multi-layer perceptron network with only two layers - one hidden and one output (the input is not counted as a layer). This class basically derives from a MultiLayerNetwork and adds functionality that make it easier to use if the network you're dealing with has only 2 layers. There is nothing you can do with this class that you can't do with MultiLayerNetwork, just that this may be easier to use.
|
Creates a two layer network.
|
|
Loads a two-layer network from a file. The file is exactly the same as a MultiLayerNetwork file, and can be loaded there as well.
|
|
Overrides MultiLayerNetwork::addLayer() so that it cannot be done.
Reimplemented from MultiLayerNetwork. |
|
Connects an input and a hidden neuron with the given weight.
|
|
Connects an input and a hidden neuron with a random weight.
|
|
Connects a hidden and an output neuron with the given weight.
|
|
Connects a hidden and an output neuron with a random weight.
|
|
Completely connects the network. All inputs are connected to all hidden neurons and all hidden neurons to all output neurons |
|
Returns "TwoLayerNetwork".
|