1 #ifndef __ONELAYERFFNN_H
2 #define __ONELAYERFFNN_H
16 double factor_bias = 0.1,
17 const std::string& name =
"OneLayerFFN",
18 const std::string& revision =
"$Id: onelayerffnn.h,v 1.10 2011/05/30 13:52:54 martius Exp $")
23 addParameter(
"factor_bias",&this->factor_bias,0,2,
"factor for learningrate of bias");
36 const std::string& name =
"OneLayerFFN",
37 const std::string& revision =
"$Id: onelayerffnn.h,v 1.10 2011/05/30 13:52:54 martius Exp $")
38 :
FeedForwardNN(
name, revision), eps(eps), factor_bias(factor_bias), actfun(actfun), dactfun(dactfun) {
40 addParameter(
"factor_bias",&this->factor_bias,0,2,
"factor for learningrate of bias");
50 virtual void init(
unsigned int inputDim,
unsigned int outputDim,
51 double unit_map = 0.0,
RandGen* randGen = 0);
57 double learnRateFactor = 1);
61 return weights.
getN();
65 return weights.
getM();
72 virtual void damp(
double damping){
73 weights *= (1-damping);
79 bool store(FILE* f)
const;
Matrix type.
Definition: matrix.h:65
virtual const matrix::Matrix process(const matrix::Matrix &input)
passive processing of the input
Definition: onelayerffnn.cpp:20
bool store(FILE *f) const
stores the layer binary into file stream
Definition: onelayerffnn.cpp:41
bool restore(FILE *f)
restores the layer binary from file stream
Definition: onelayerffnn.cpp:48
virtual ~OneLayerFFNN()
Definition: onelayerffnn.h:43
I getM() const
Definition: matrix.h:88
virtual unsigned int getOutputDim() const
returns the number of output neurons
Definition: onelayerffnn.h:64
iparamkey name
Definition: inspectable.h:251
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
virtual void damp(double damping)
damps the weights and the biases by multiplying (1-damping)
Definition: onelayerffnn.h:72
I getN() const
Definition: matrix.h:90
virtual const matrix::Matrix learn(const matrix::Matrix &input, const matrix::Matrix &nom_output, double learnRateFactor=1)
performs learning and returns the network output before learning
Definition: onelayerffnn.cpp:25
virtual void addParameter(const paramkey &key, paramval *val, paramval minBound, paramval maxBound, const paramdescr &descr=paramdescr())
This is the new style for adding configurable parameters.
Definition: configurable.h:172
OneLayerFFNN(double eps, double factor_bias, ActivationFunction actfun, ActivationFunction dactfun, const std::string &name="OneLayerFFN", const std::string &revision="$Id: onelayerffnn.h,v 1.10 2011/05/30 13:52:54 martius Exp $")
Definition: onelayerffnn.h:32
virtual unsigned int getInputDim() const
returns the number of input neurons
Definition: onelayerffnn.h:60
abstract class (interface) for feed forward rate based neural networks
Definition: feedforwardnn.h:41
static double dlinear(double)
Definition: feedforwardnn.h:55
simple one layer neural network with configurable activation function
Definition: onelayerffnn.h:8
virtual const matrix::Matrix & getBias() const
Definition: onelayerffnn.h:69
virtual void init(unsigned int inputDim, unsigned int outputDim, double unit_map=0.0, RandGen *randGen=0)
initialisation of the network with the given number of input and output units
Definition: onelayerffnn.cpp:8
double(* ActivationFunction)(double)
activation function type: input: membrane potential
Definition: feedforwardnn.h:34
static double linear(double z)
Definition: feedforwardnn.h:54
virtual const matrix::Matrix & getWeights() const
Definition: onelayerffnn.h:68
OneLayerFFNN(double eps, double factor_bias=0.1, const std::string &name="OneLayerFFN", const std::string &revision="$Id: onelayerffnn.h,v 1.10 2011/05/30 13:52:54 martius Exp $")
Uses linear activation function.
Definition: onelayerffnn.h:15