Feedforward Closedloop Learning: fcl_util.h Source File

Feedforward Closedloop Learning

fcl_util.h
1 #ifndef __FEEDFORWARD_CLOSEDLOOP_LEARNING_UTIL_H_
2 #define __FEEDFORWARD_CLOSEDLOOP_LEARNING_UTIL_H_
3
4 #include "fcl/globals.h"
5 #include "fcl/layer.h"
6 #include "fcl/neuron.h"
7 #include "fcl/bandpass.h"
8 #include "fcl.h"
9
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <math.h>
13 #include <assert.h>
14
21 class FeedforwardClosedloopLearningWithFilterbank : public FeedforwardClosedloopLearning {
25 public:
37 FeedforwardClosedloopLearningWithFilterbank(
38 int num_of_inputs,
39 int* num_of_neurons_per_layer_array,
40 int num_layers,
41 int num_filtersInput,
42 double minT,
43 double maxT);
44
48 ~FeedforwardClosedloopLearningWithFilterbank();
49
54 void doStep(double* input, double* error);
55
58 void doStep(double* input, int n1, double* error, int n2);
59
60 double getFilterOutput(int inputIdx, int filterIdx) {
61 const int idx = inputIdx * nFiltersPerInput + filterIdx;
62 assert((idx >= 0) || (idx < (nFiltersPerInput * nInputs)));
63 return filterbankOutputs[idx];
64 }
65
66 int getNFiltersPerInput() {
67 return nFiltersPerInput;
68 }
69
70 private:
71 const double dampingCoeff = 0.51;
72 Bandpass ***bandpass = 0;
73 double* filterbankOutputs = 0;
74 int nFiltersPerInput = 0;
75 int nInputs = 0;
76 };
77
78 #endif
FeedforwardClosedloopLearningWithFilterbank
Derived classes of the FeedforwardClosedloopLearning class for special functionality.
Definition: fcl_util.h:21
FeedforwardClosedloopLearningWithFilterbank::doStep
void doStep(double *input, double *error)
Performs the simulation step.
FeedforwardClosedloopLearningWithFilterbank::~FeedforwardClosedloopLearningWithFilterbank
~FeedforwardClosedloopLearningWithFilterbank()
Destructor.
FeedforwardClosedloopLearning
Main class of Feedforward Closed Loop Learning.
Definition: fcl.h:30
Bandpass
Creates memory traces at specified length.
Definition: bandpass.h:14
FeedforwardClosedloopLearningWithFilterbank::FeedforwardClosedloopLearningWithFilterbank
FeedforwardClosedloopLearningWithFilterbank(int num_of_inputs, int *num_of_neurons_per_layer_array, int num_layers, int num_filtersInput, double minT, double maxT)
FeedforwardClosedloopLearning with Filterbank at each input.