24 #ifndef __MODELWITHMEMORYADAPTER_H
25 #define __MODELWITHMEMORYADAPTER_H
42 virtual void init(
unsigned int inputDim,
unsigned int outputDim,
51 double learnRateFactor = 1);
73 virtual void damp(
double damping) { model->
damp(damping);}
105 inp(inp), out(out), lrFactor(lrFactor){}
Matrix type.
Definition: matrix.h:65
virtual ilayerlist getStructuralLayers() const
Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering...
Definition: modelwithmemoryadapter.h:94
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: modelwithmemoryadapter.cpp:41
abstract class (interface) for invertable models.
Definition: invertablemodel.h:33
std::list< IConnection > iconnectionlist
Definition: inspectable.h:88
std::vector< Pat > memory
vector of input output mappings
Definition: modelwithmemoryadapter.h:115
virtual unsigned int getInputDim() const =0
returns the number of input neurons
Definition: modelwithmemoryadapter.h:102
int memorySize
Definition: modelwithmemoryadapter.h:112
virtual const matrix::Matrix process(const matrix::Matrix &input)=0
passive processing of the input (this function is not constant since a recurrent network for example ...
virtual unsigned int getOutputDim() const =0
returns the number of output neurons
virtual unsigned int getOutputDim() const
returns the number of output neurons
Definition: modelwithmemoryadapter.h:70
Inspectable * getModel()
Definition: modelwithmemoryadapter.h:77
virtual void damp(double damping)=0
damps the weights and the biases by multiplying (1-damping)
RandGen * randGen
Definition: modelwithmemoryadapter.h:116
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
virtual ~ModelWithMemoryAdapter()
Definition: modelwithmemoryadapter.h:40
double lrFactor
Definition: modelwithmemoryadapter.h:108
virtual iparamkeylist getInternalParamNames() const
The list of the names of all internal parameters given by getInternalParams().
Definition: modelwithmemoryadapter.h:92
virtual iparamvallist getInternalParams() const
Definition: inspectable.cpp:52
virtual iparamvallist getInternalParams() const
Definition: modelwithmemoryadapter.h:93
virtual const matrix::Matrix response(const matrix::Matrix &input) const =0
calculates the partial derivative of the of the output with repect to the input (Jacobi matrix)...
virtual iconnectionlist getStructuralConnections() const
Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The...
Definition: modelwithmemoryadapter.h:95
matrix::Matrix inp
Definition: modelwithmemoryadapter.h:106
InvertableModel * model
Definition: modelwithmemoryadapter.h:111
virtual const matrix::Matrix inversion(const matrix::Matrix &input, const matrix::Matrix &xsi) const
calculates the input shift v to given output shift xsi via pseudo inversion.
Definition: modelwithmemoryadapter.h:63
virtual unsigned int getInputDim() const
returns the number of input neurons
Definition: modelwithmemoryadapter.h:67
Interface for inspectable objects.
Definition: inspectable.h:48
virtual const matrix::Matrix learn(const matrix::Matrix &input, const matrix::Matrix &nom_output, double learnRateFactor=1)
learn the input output mapping but also learn mappings from the memory.
Definition: modelwithmemoryadapter.cpp:53
int numPatternsPerStep
Definition: modelwithmemoryadapter.h:113
Pat(const matrix::Matrix &inp, const matrix::Matrix &out, const double &lrFactor)
Definition: modelwithmemoryadapter.h:104
const Inspectable * getModel() const
Definition: modelwithmemoryadapter.h:80
virtual ilayerlist getStructuralLayers() const
Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering...
Definition: inspectable.cpp:77
virtual const matrix::Matrix inversion(const matrix::Matrix &input, const matrix::Matrix &xsi) const =0
calculates the input shift v to given output shift xsi via pseudo inversion.
virtual const matrix::Matrix process(const matrix::Matrix &input)
passive processing of the input (this function is not constant since a recurrent network for example ...
Definition: modelwithmemoryadapter.h:55
bool store(FILE *f) const
stores the layer binary into file stream
Definition: modelwithmemoryadapter.h:87
bool restore(FILE *f)
restores the layer binary from file stream
Definition: modelwithmemoryadapter.h:89
virtual iconnectionlist getStructuralConnections() const
Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The...
Definition: inspectable.cpp:81
virtual iparamkeylist getInternalParamNames() const
The list of the names of all internal parameters given by getInternalParams().
Definition: inspectable.cpp:33
virtual bool store(FILE *f) const =0
stores the object to the given file stream (ASCII preferred).
virtual void damp(double damping)
damps the weights and the biases by multiplying (1-damping)
Definition: modelwithmemoryadapter.h:73
Pat()
Definition: modelwithmemoryadapter.h:103
std::list< ILayer > ilayerlist
Definition: inspectable.h:87
virtual bool restore(FILE *f)=0
loads the object from the given file stream (ASCII preferred).
virtual const matrix::Matrix response(const matrix::Matrix &input) const
calculates the partial derivative of the of the output with repect to the input (Jacobi matrix)...
Definition: modelwithmemoryadapter.h:59
std::list< iparamkey > iparamkeylist
Definition: inspectable.h:59
std::list< iparamval > iparamvallist
Definition: inspectable.h:61
multi layer neural network with configurable activation functions
Definition: modelwithmemoryadapter.h:32
ModelWithMemoryAdapter(InvertableModel *model, int memorySize, int numPatternsPerStep)
Definition: modelwithmemoryadapter.cpp:31
matrix::Matrix out
Definition: modelwithmemoryadapter.h:107