TarzaNN
TarzaNN neural network simulator
|
00001 #ifndef SOMFeaturePlane_H_INCLUDED 00002 #define SOMFeaturePlane_H_INCLUDED 00003 00004 #include <qimage.h> 00005 00006 #include "nowarn.h" 00007 #include "common.h" 00008 #include <stdlib.h> 00009 00010 #include "OutputImage.h" 00011 #include "LearningFeaturePlane.h" 00012 #include "FilterBank.h" 00013 #include "PlaneInputWindowSet.h" 00014 #include "MatrixOfMatrix.h" 00015 00017 class SOMFeaturePlane : public LearningFeaturePlane { 00018 friend class GatingUnits; 00019 friend class FeaturePlaneFactory; 00020 public: 00021 ~SOMFeaturePlane(); 00022 void read(QDataStream* inStream, QProgressDialog* progress, int* index); 00023 00024 void save(QDataStream* outStream, QProgressDialog* progress, int* index); 00025 bool isLearning(); 00026 00027 protected: 00028 00045 SOMFeaturePlane( Network* net, int l, QString* name, int w, int h, int angles, int speeds, int alpha, int speed, bool isWTA, bool visible, Neuron* neuron, NotifyStrategyAbstract* notify, bool learning); 00046 void step(); 00047 00048 float nonlinearity(Matrix* totalActivation, OutputImage* workOutput); 00049 00050 00051 private: 00052 FilterBank* lgnONFilters; 00053 FilterBank* lgnOFFFilters; 00054 FilterBank* excitatoryFilters; 00055 FilterBank* inhibitoryFilters; 00056 00057 void addLateralContribution(FilterBank* excitatoryFilters, OutputImage* lastTimestep, float factor); 00058 void learn(); 00059 void updateWeights(FilterBank* filters, Matrix* input, float alpha, bool fromInput); 00060 00061 }; 00062 #endif //SOMFeaturePlane_H_INCLUDED