|
From: Herton R. K. <he...@us...> - 2005-07-03 02:14:46
|
Update of /cvsroot/kimageprocess/kimageprocess/src/plugins/fann In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3318/plugins/fann Modified Files: fann.cpp fann.h Log Message: - Fixing more bugs. Index: fann.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/fann/fann.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- fann.h 3 Jul 2005 00:31:40 -0000 1.5 +++ fann.h 3 Jul 2005 02:14:33 -0000 1.6 @@ -46,6 +46,8 @@ void doTraining(const QValueList<dataEntry>& data, int inputs, int outputs); void doClassify(const QValueList<dataEntry>& data, int inputs, int outputs); + QString classifierName() { return "fann"; } + private: struct fann *m_network; int m_hiddenLayers; Index: fann.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/fann/fann.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- fann.cpp 3 Jul 2005 01:09:17 -0000 1.7 +++ fann.cpp 3 Jul 2005 02:14:32 -0000 1.8 @@ -61,7 +61,7 @@ //create the network unsigned int neurons[m_hiddenLayers + 2]; neurons[0] = inputs; - for ( int i=1; i < m_hiddenLayers; ++i ) { + for ( int i=1; i < m_hiddenLayers + 1; ++i ) { neurons[i] = inputs; } neurons[m_hiddenLayers + 1] = outputs; @@ -161,6 +161,8 @@ KIO::NetAccess::upload(tmpImg.name(), dest, 0); KIO::NetAccess::removeTempFile(tmpImg.name()); } + + delete img; } void KTFANNPlugin::setupPlugin() |