NeuralNetwork.h

00001 #ifndef __NEURAL_NETWORK_
00002 #define __NEURAL_NETWORK_
00003 
00004 #include "StandardAlgorithm.h"
00005 #include "Framework.h"
00006 #include "nn.h"
00007 
00008 using namespace std;
00009 
00017 class NeuralNetwork : public StandardAlgorithm, public Framework
00018 {
00019 public:
00020     NeuralNetwork();
00021     ~NeuralNetwork();
00022 
00023     void demo();
00024 
00025     virtual void modelInit();
00026     virtual void modelUpdate ( REAL* input, REAL* target, uint nSamples, uint crossRun );
00027     virtual void predictAllOutputs ( REAL* rawInputs, REAL* outputs, uint nSamples, uint crossRun );
00028     virtual void readSpecificMaps();
00029     virtual void saveWeights ( int cross );
00030     virtual void loadWeights ( int cross );
00031     virtual void loadMetaWeights ( int cross );
00032 
00033     static string templateGenerator ( int id, string preEffect, int nameID, bool blendStop );
00034 
00035 private:
00036     // inputs/targets
00037     REAL** m_inputs;
00038 
00039     // the NNs
00040     NN** m_nn;
00041     int m_epoch;
00042 
00043     // dsc file
00044     int m_nrLayer;
00045     int m_batchSize;
00046     double m_offsetOutputs;
00047     double m_scaleOutputs;
00048     double m_initWeightFactor;
00049     double m_learnrate;
00050     double m_learnrateMinimum;
00051     double m_learnrateSubtractionValueAfterEverySample;
00052     double m_learnrateSubtractionValueAfterEveryEpoch;
00053     double m_momentum;
00054     double m_weightDecay;
00055     double m_minUpdateErrorBound;
00056     double m_etaPosRPROP;
00057     double m_etaNegRPROP;
00058     double m_minUpdateRPROP;
00059     double m_maxUpdateRPROP;
00060     bool m_enableL1Regularization;
00061     bool m_enableErrorFunctionMAE;
00062     bool m_enableRPROP;
00063     bool m_useBLASforTraining;
00064     string m_neuronsPerLayer;
00065     string m_activationFunction;
00066 
00067 };
00068 
00069 
00070 #endif

Generated on Tue Jan 26 09:20:59 2010 for ELF by  doxygen 1.5.8