class FFLayer
|
Represents one (fully-connected) layer from a multi-layer percetron (FFNet)
More... |
|
|
Public Methods
- void (*func) (float *, float *, int)
- void (*deriv_func) (float *, float *, int)
- FFLayer () : derivOffset(0)
- FFLayer (int _nbNeurons, int _nbInputs, float *_weights, int _weightOffset, int _neuronOffset, string type = "tansig")
- FFLayer (const FFLayer &layer)
- void setupAfterRead (float *_weights, int _weightOffset, int _neuronOffset)
- ~ FFLayer ()
- void update (const float *previous, float *value, float *deriv=NULL)
- int size ()
- int getNbWeights ()
- int getNeuronWeightOffset (int i)
- int getWeightOffset ()
- int getNeuronOffset ()
- void init (float minmax)
- void init (double *mean, double *std)
- void setBias (double *minmax)
- float * getWeights (int i)
- void printOn (ostream &out) const
- void readFrom (istream &in)
- void setDerivOffset (float d)
Protected Members
Detailed Description
Represents one (fully-connected) layer from a multi-layer percetron (FFNet)
| void (*func) (float *, float *, int)
|
Activation function pointer
| void (*deriv_func) (float *, float *, int)
|
Activation function derivative pointer
[protected]
Number of neurons in the layer
[protected]
Number of input neurons
[protected]
Pointer to the weight vector
[protected]
[protected]
Offset of the layer weight vector in the network weight vector
[protected]
Offset of the layer's first neuron in the list of all network neurons
(not too sure about that one, though)
[protected]
Offset of the layer's first neuron derivative in the list of all network neurons
| FFLayer () : derivOffset(0)
|
This (empty) constructor is used for parsing a layer from a file
| FFLayer (int _nbNeurons, int _nbInputs, float *_weights, int _weightOffset, int _neuronOffset, string type = "tansig")
|
Standard constructor
Unimplemented yet (not sure if we *should* implement it)
| void setupAfterRead (float *_weights, int _weightOffset, int _neuronOffset)
|
Called after reading a layer to setup the weight vector correctly
| void update (const float *previous, float *value, float *deriv=NULL)
|
Calculates all the activation functions (and derivatives) for a given input
Layer size
Number of weights
| int getNeuronWeightOffset (int i)
|
Offset of a certain neuron's weight vector relative to the whole network's
weight vector
| void init (double *mean, double *std)
|
Initializes the layer values given the means and standard deviations of each
of the inputs
| void setBias (double *minmax)
|
Sets the bias vector
| float * getWeights (int i)
|
| void printOn (ostream &out)
|
[const]
Writes the layer to a stream
Reimplemented from Object.
| void readFrom (istream &in)
|
Reads the layer from a stream (remember to call setupAfterRead after that
Reimplemented from Object.
| void setDerivOffset (float d)
|
- Author: : Jean-Marc Valin
- Generated: jmvalin@usw-pr-shell2 on Mon Jun 24 00:06:43 2002, using kdoc 2.0a40.