gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
NeuralNetwork< TYPE > Class Template Reference

#include <NeuralNetwork.H>

Public Member Functions

 NeuralNetwork (void)
 Constructor. More...
virtual ~NeuralNetwork (void)
 Destructor. More...
void activate (vector< NeuralLayer< TYPE > *> &layers, Eigen::Matrix< TYPE, Eigen::Dynamic, 1 > &input)

Detailed Description

template<typename TYPE>
class NeuralNetwork< TYPE >

Implements a feed forward neural network. The network is used as follows :

// Begin constructing the neural network topology
vector<NeuralLayer<double> *> networkLayers;
networkLayers.push_back(new TanhLayer<double>(weights, bias));
networkLayers.push_back(new TanhLayer<double>(weights, bias));
// setup some input
Eigen::Matrix<double, Eigen::Dynamic, 1> input(10,1);
// Actiave the Neural Network
nn.activate(networkLayers, input);
// the result is in the last layer
Template Parameters
TYPEthe precision of the data to use, e.g. float, double
NeuralNetworkFnTest.C, and NeuralNetworkTest.C.

Definition at line 222 of file NeuralNetwork.H.

Constructor & Destructor Documentation

◆ NeuralNetwork()

template<typename TYPE>
NeuralNetwork< TYPE >::NeuralNetwork ( void  )


Definition at line 225 of file NeuralNetwork.H.

◆ ~NeuralNetwork()

template<typename TYPE>
virtual NeuralNetwork< TYPE >::~NeuralNetwork ( void  )


Definition at line 228 of file NeuralNetwork.H.

Member Function Documentation

◆ activate()

template<typename TYPE>
void NeuralNetwork< TYPE >::activate ( vector< NeuralLayer< TYPE > *> &  layers,
Eigen::Matrix< TYPE, Eigen::Dynamic, 1 > &  input 

Activates all layers in the neural network. The last layer has the output

layersVarious neural network layers, 0 being the input layer
inputThe input vector to feed forward

Definition at line 235 of file NeuralNetwork.H.

The documentation for this class was generated from the following file:
gtkIOStream: NeuralNetwork< TYPE > Class Template Reference
GTK+ IOStream  Beta