TarzaNN
TarzaNN neural network simulator
|
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 SOMDataset_H_INCLUDED 00024 #define SOMDataset_H_INCLUDED 00025 00026 #include <vector> 00027 using namespace std; 00028 #include "Dataset.h" 00029 #include <QDir> 00030 00031 #define STEPS_STAGE_1 10000 00032 #define STEPS_STAGE_2 10000 00033 #define STEPS_STAGE_3 10000 00034 00035 #define IMAGE_SIZE_X 54 00036 #define IMAGE_SIZE_Y 54 00037 00038 //Dataset for SOM learning - based on Risto Miikkulainen, James A. Bednar, Yoonsuck Choe, and Joseph Sirosh. Computational Maps in the Visual Cortex. Springer, Berlin, 2005. 00039 class SOM_Dataset : public Dataset { 00040 00041 private: 00042 long imageBaseOffset; 00043 long imageSize; 00044 FILE* imageFile; 00045 char* currentfileName; 00046 QFileInfoList fileList; 00047 Matrix* result; 00048 00049 public: 00051 SOM_Dataset(char* basefilename); 00052 ~SOM_Dataset(); 00054 OutputImage* getImage(int index, OutputImage** list, int LorR=0); 00056 Matrix* getDesiredOutcome(int index); 00058 int getRandomIndex(); 00059 }; 00060 #endif/*SOMDataset_H_INCLUDED*/