TarzaNN
TarzaNN neural network simulator
C:/Users/albertlr/projects/TarzaNN/TarzaNN/GatingUnits.h
Go to the documentation of this file.
00001 #ifndef GATINGUNITS_H_INCLUDED
00002 #define GATINGUNITS_H_INCLUDED
00003 #include <stdio.h>
00004 #include <assert.h>
00005 #include "MatrixOfMatrix.h"
00006 #include "OutputImage.h"
00007 #include "Filter.h"
00008 
00009 class LearningFeaturePlane;
00010 
00012 class GatingUnits:public MatrixOfMatrix<Matrix>{
00013 
00014 public:
00015                 
00016         GatingUnits( const int nXSize, const int nYSize, const int filterSizeX, const int filterSizeY, const int inputSizeX, const int inputSizeY);
00017         
00019     ~GatingUnits();
00020         
00022         float getGUMax();
00023         
00025         float getGUMin();
00026         
00028         OutputImage* stepGatingUnits(Matrix* gc, float max, float theta);
00029         OutputImage* stepGatingUnitsLearn(Matrix* gc, float max, float theta, LearningFeaturePlane* fp);
00030 
00031         inline void computeActivations(Matrix* activations){
00032                 for(int gy=0; gy<height; gy++)
00033                         for(int gx=0; gx<width; gx++)
00034                                 (*activations)(gx,gy)=(*this)(gx,gy)->sumAll();
00035         }
00036 
00037         void setZero();
00038 
00039 };
00040 typedef vector<GatingUnits*> GatingUnitsVector;
00041 #endif /*GATINGUNITS_H_INCLUDED*/
00042 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines