TarzaNN
TarzaNN neural network simulator
C:/Users/albertlr/projects/TarzaNN/TarzaNN/LearningFeaturePlane.h
Go to the documentation of this file.
00001 /****************************************************************************
00002  **
00003  ** Copyright C 2002-2012 Laboratory for Active and Attentive Vision (LAAV), Department of Computer Science and Engineering, York University, Toronto, ON, Canada.
00004  ** All rights reserved.
00005  **
00006  ** This file is part of the TarzaNN Neural Network Simulator.
00007  **
00008  ** This file may be distributed and/or modified under the terms of the
00009  ** GNU General Public License version 2 as published by the Free Software
00010  ** Foundation and appearing in the file LICENSE.GPL included in the
00011  ** packaging of this file.
00012  **
00013  ** See http://www.tarzann.org/gpl/ for GPL licensing information.
00014  **
00015  ** Contact info@tarzann.org if any conditions of this licensing are
00016  ** not clear to you.
00017  **
00018  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00019  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00020  **
00021  ****************************************************************************/
00022 
00023 #ifndef LearningFeaturePlane_H_INCLUDED
00024 #define LearningFeaturePlane_H_INCLUDED
00025 
00026 #include  <qimage.h>
00027 
00028 #include "nowarn.h"
00029 #include "common.h"
00030 #include <stdlib.h>
00031 
00032 #include "OutputImage.h"
00033 #include "FeaturePlane.h"
00034 #include "FilterBank.h"
00035 #include "PlaneInputWindowSet.h"
00036 
00038 //class LearningFeaturePlane : public FeaturePlaneAbstract {
00039 class LearningFeaturePlane : public FeaturePlane {
00040         friend class GatingUnits;
00041         friend class FeaturePlaneFactory;
00042 public:
00043     ~LearningFeaturePlane();
00044         virtual void read(QDataStream* inStream, QProgressDialog* progress, int* index)=0;
00045         virtual void save(QDataStream* outStream, QProgressDialog* progress, int* index)=0;
00046 
00047 protected:
00048         
00057         LearningFeaturePlane( 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);
00058         FeaturePlaneInput* addFilter(Filter* f, FeaturePlaneAbstract*fp, int type, int fpOutputIndex, bool wta);
00059         float computeSkip(int input, int output, int filter);
00060         
00061         void setWindowRange(int input_width, int input_height, int filter_width, int filter_height);
00062         void computeGatingUnits();
00063 
00064         PlaneInputWindowSet *windows;
00065         Matrix* activations;
00066         Matrix* desiredOutcome;
00067         Matrix* errorMatrix;
00068         vector<Matrix*> backErrorMatrix;
00069                 
00070         bool learning;
00071         vector<FilterBank*> inputFilters;
00072         float ita;
00073 };
00074 #endif //LearningFeaturePlane_H_INCLUDED
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines