Offers methods for creating connection matrices for neural networks. More...
#include <Array/ArrayIo.h>#include <fstream>Go to the source code of this file.
Functions | |
| void | createConnectionMatrix (Array< int > &con, Array< unsigned > &layers, bool ff_layer=true, bool ff_in_out=true, bool ff_all=true, bool bias=true) |
| Creates a connection matrix for a network. | |
| void | createConnectionMatrix (Array< int > &con, unsigned in, unsigned hidden, unsigned out, bool ff_layer=true, bool ff_in_out=true, bool ff_all=true, bool bias=true) |
| Creates a connection matrix for a network with a single hidden layer. | |
| void | createConnectionMatrix (Array< int > &con, unsigned in, unsigned hidden1, unsigned hidden2, unsigned out, bool ff_layer=true, bool ff_in_out=true, bool ff_all=true, bool bias=true) |
| Creates a connection matrix for a network with two hidden layers. | |
| void | createConnectionMatrixRNN (Array< int > &con, unsigned in, unsigned hidden, unsigned out, unsigned memory=1, bool layered=false, bool recurrentInputs=true, bool bias=true, bool elman=false, bool previousInputs=false) |
| Creates a connection matrix for a recurrent network. | |
Offers methods for creating connection matrices for neural networks.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Definition in file createConnectionMatrix.h.
| void createConnectionMatrix | ( | Array< int > & | con, | |
| unsigned | in, | |||
| unsigned | hidden1, | |||
| unsigned | hidden2, | |||
| unsigned | out, | |||
| bool | ff_layer = true, |
|||
| bool | ff_in_out = true, |
|||
| bool | ff_all = true, |
|||
| bool | bias = true | |||
| ) |
Creates a connection matrix for a network with two hidden layers.
Automatically creates a connection matrix for a network with four different layers: An input layer with in input neurons, an output layer with out output neurons and two hidden layers with hidden1 and hidden2 hidden neurons, respectively. (Standard) connections can be defined by ff_layer, ff_in_out, ff_all and bias.
| con | the resulting connection matrix. | |
| in | number of input neurons. | |
| hidden1 | number of neurons of the first hidden layer. | |
| hidden2 | number of neurons of the second hidden layer. | |
| out | number of output neurons. | |
| ff_layer | if set to true, connections from each neuron of layer to each neuron of layer will be set for all layers. | |
| ff_in_out | if set to true, connections from all input neurons to all output neurons will be set. | |
| ff_all | if set to true, connections from all neurons of layer to all neurons of layers with will be set for all layers . | |
| bias | if set to true, connections from all neurons (except the input neurons) to the bias will be set. |
Definition at line 269 of file createConnectionMatrix.h.
References createConnectionMatrix().
| void createConnectionMatrix | ( | Array< int > & | con, | |
| unsigned | in, | |||
| unsigned | hidden, | |||
| unsigned | out, | |||
| bool | ff_layer = true, |
|||
| bool | ff_in_out = true, |
|||
| bool | ff_all = true, |
|||
| bool | bias = true | |||
| ) |
Creates a connection matrix for a network with a single hidden layer.
Automatically creates a connection matrix for a network with three different layers: An input layer with in input neurons, an output layer with out output neurons and a single hidden layer with hidden hidden neurons. (Standard) connections can be defined by ff_layer, ff_in_out, ff_all and bias.
| con | the resulting connection matrix. | |
| in | number of input neurons. | |
| hidden | number of neurons of the single hidden layer. | |
| out | number of output neurons. | |
| ff_layer | if set to true, connections from each neuron of layer to each neuron of layer will be set for all layers. | |
| ff_in_out | if set to true, connections from all input neurons to all output neurons will be set. | |
| ff_all | if set to true, connections from all neurons of layer to all neurons of layers with will be set for all layers . | |
| bias | if set to true, connections from all neurons (except the input neurons) to the bias will be set. |
Definition at line 212 of file createConnectionMatrix.h.
References createConnectionMatrix().
| void createConnectionMatrix | ( | Array< int > & | con, | |
| Array< unsigned > & | layers, | |||
| bool | ff_layer = true, |
|||
| bool | ff_in_out = true, |
|||
| bool | ff_all = true, |
|||
| bool | bias = true | |||
| ) |
Creates a connection matrix for a network.
Automatically creates a connection matrix with several layers, with the numbers of neurons for each layer defined by layers and (standard) connections defined by ff_layer, ff_in_out, ff_all and bias.
| con | the resulting connection matrix. | |
| layers | contains the numbers of neurons for each layer of the network. | |
| ff_layer | if set to true, connections from each neuron of layer to each neuron of layer will be set for all layers. | |
| ff_in_out | if set to true, connections from all input neurons to all output neurons will be set. | |
| ff_all | if set to true, connections from all neurons of layer to all neurons of layers with will be set for all layers . | |
| bias | if set to true, connections from all neurons (except the input neurons) to the bias will be set. |
Definition at line 90 of file createConnectionMatrix.h.
Referenced by createConnectionMatrix().
| void createConnectionMatrixRNN | ( | Array< int > & | con, | |
| unsigned | in, | |||
| unsigned | hidden, | |||
| unsigned | out, | |||
| unsigned | memory = 1, |
|||
| bool | layered = false, |
|||
| bool | recurrentInputs = true, |
|||
| bool | bias = true, |
|||
| bool | elman = false, |
|||
| bool | previousInputs = false | |||
| ) |
Creates a connection matrix for a recurrent network.
Definition at line 295 of file createConnectionMatrix.h.
References i.