Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

FD::FFLayer Class Reference

#include <FFLayer.h>

Inheritance diagram for FD::FFLayer:

Inheritance graph
[legend]
Collaboration diagram for FD::FFLayer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FFLayer ()
 FFLayer (int _nbNeurons, int _nbInputs, float *_weights, int _weightOffset, int _neuronOffset, std::string type="tansig")
 FFLayer (const FFLayer &layer)
void setupAfterRead (float *_weights, int _weightOffset, int _neuronOffset)
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 (std::ostream &out) const
void readFrom (std::istream &in)
void setDerivOffset (float d)

Public Attributes

void(* func )(float *, float *, int)
void(* deriv_func )(float *, float *, int)

Protected Attributes

int nbNeurons
int nbInputs
float * weights
std::string funcType
int weightOffset
int neuronOffset
float derivOffset

Detailed Description

Represents one (fully-connected) layer from a multi-layer percetron (FFNet)
Author:
: Jean-Marc Valin


Constructor & Destructor Documentation

FD::FFLayer::FFLayer  )  [inline]
 

This (empty) constructor is used for parsing a layer from a file

FD::FFLayer::FFLayer int  _nbNeurons,
int  _nbInputs,
float *  _weights,
int  _weightOffset,
int  _neuronOffset,
std::string  type = "tansig"
 

Standard constructor

FD::FFLayer::FFLayer const FFLayer layer  )  [inline]
 

Unimplemented yet (not sure if we *should* implement it)


Member Function Documentation

int FD::FFLayer::getNbWeights  )  [inline]
 

Number of weights

int FD::FFLayer::getNeuronWeightOffset int  i  )  [inline]
 

Offset of a certain neuron's weight vector relative to the whole network's weight vector

void FD::FFLayer::init double *  mean,
double *  std
 

Initializes the layer values given the means and standard deviations of each of the inputs

void FD::FFLayer::printOn std::ostream &  out  )  const [virtual]
 

Writes the layer to a stream

Implements FD::Object.

void FD::FFLayer::readFrom std::istream &  in  )  [virtual]
 

Reads the layer from a stream (remember to call setupAfterRead after that

Reimplemented from FD::Object.

void FD::FFLayer::setBias double *  minmax  ) 
 

Sets the bias vector

void FD::FFLayer::setupAfterRead float *  _weights,
int  _weightOffset,
int  _neuronOffset
 

Called after reading a layer to setup the weight vector correctly

int FD::FFLayer::size  )  [inline]
 

Layer size

void FD::FFLayer::update const float *  previous,
float *  value,
float *  deriv = NULL
[inline]
 

Calculates all the activation functions (and derivatives) for a given input


Member Data Documentation

void(* FD::FFLayer::deriv_func)(float *, float *, int)
 

Activation function derivative pointer

float FD::FFLayer::derivOffset [protected]
 

Offset of the layer's first neuron derivative in the list of all network neurons

void(* FD::FFLayer::func)(float *, float *, int)
 

Activation function pointer

int FD::FFLayer::nbInputs [protected]
 

Number of input neurons

int FD::FFLayer::nbNeurons [protected]
 

Number of neurons in the layer

int FD::FFLayer::neuronOffset [protected]
 

Offset of the layer's first neuron in the list of all network neurons (not too sure about that one, though)

int FD::FFLayer::weightOffset [protected]
 

Offset of the layer weight vector in the network weight vector

float* FD::FFLayer::weights [protected]
 

Pointer to the weight vector


The documentation for this class was generated from the following file:
Generated on Wed Oct 5 14:30:24 2005 for FlowDesigner by  doxygen 1.4.4