class FFNet
|
Feed-forward neural network (MLP) class
More... |
|
|
Public Methods
- FFNet (const Vector<int> &_topo, const Vector<string> &functions)
- FFNet ()
- FFNet (FFNet &net)
- FFNet (const Vector<int> &_topo, const Vector<string> &functions, vector<float *> &tin, vector<float *> &tout)
- void init (const Vector<string> &functions)
- void setupLayersAfterRead ()
- float * calc (const float *input, float *value, float *deriv=NULL)
- void learn (float *input, float *output, double *gradient, double *err=NULL, float *calc_output=NULL)
- void calcGradient (vector<float *> &tin, vector<float *> &tout, Array<float> weights, Array<double> &gradient, double &err)
- void weightedLearn (float *input, float *output, float *learnWeights, double *gradient, double *err=NULL, float *calc_output=NULL)
- void weightedCalcGradient (vector<float *> &tin, vector<float *> &tout, vector<float *> &learnWeights, Array<float> weights, Array<double> &gradient, double &err)
- float totalError (vector<float *> tin, vector<float *> tout)
- int getNbWeights ()
- int getNbNeurons ()
- const Vector<int> & getTopo ()
- const Vector<RCPtr<FFLayer> > & getLayers ()
- const float * getWeights ()
- void setWeights (float *ptr)
- void setDerivOffset (float d)
- void printOn (ostream &out) const
- void readFrom (istream &in)
Protected Members
Detailed Description
Feed-forward neural network (MLP) class
[protected]
Network topology
[protected]
Pointers to all MLP layers
[protected]
Complete weight vector
[protected]
Total number of neurons
[protected]
Total number of weights
FFNet (const Vector<int> &_topo, const Vector<string> &functions)
|
FFNet (const Vector<int> &_topo, const Vector<string> &functions, vector<float *> &tin, vector<float *> &tout)
|
void init (const Vector<string> &functions)
|
void setupLayersAfterRead ()
|
float * calc (const float *input, float *value, float *deriv=NULL)
|
Calculates the network result for a certain input
void learn (float *input, float *output, double *gradient, double *err=NULL, float *calc_output=NULL)
|
Calculates the gradient for a single sample
void calcGradient (vector<float *> &tin, vector<float *> &tout, Array<float> weights, Array<double> &gradient, double &err)
|
Calculates the gradient for a set of sample
void weightedLearn (float *input, float *output, float *learnWeights, double *gradient, double *err=NULL, float *calc_output=NULL)
|
Calculates the gradient for a single sample using variable weight
void weightedCalcGradient (vector<float *> &tin, vector<float *> &tout, vector<float *> &learnWeights, Array<float> weights, Array<double> &gradient, double &err)
|
Calculates the gradient for a set of sample using variable weight
float totalError (vector<float *> tin, vector<float *> tout)
|
Mean square error for a complete set
const Vector<int> & getTopo ()
|
const float * getWeights ()
|
void setWeights (float *ptr)
|
void setDerivOffset (float d)
|
void printOn (ostream &out)
|
[const]
Writes an MLP to a stream
Reimplemented from Object.
void readFrom (istream &in)
|
Reads an MLP from a stream
Reimplemented from Object.
- Author: : Jean-Marc Valin
- Generated: jmvalin@usw-pr-shell2 on Mon Jun 24 00:06:43 2002, using kdoc 2.0a40.