00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __TwoHiddenLayerBackPropNeuralNetworkBase_h
00018 #define __TwoHiddenLayerBackPropNeuralNetworkBase_h
00019
00020 #include "itkMultilayerNeuralNetworkBase.h"
00021 #include "itkBackPropagationLayer.h"
00022 #include "itkCompletelyConnectedWeightSet.h"
00023 #include "itkSigmoidTransferFunction.h"
00024 #include "itkLogSigmoidTransferFunction.h"
00025 #include "itkTanSigmoidTransferFunction.h"
00026 #include "itkHardLimitTransferFunction.h"
00027 #include "itkSignedHardLimitTransferFunction.h"
00028 #include "itkGaussianTransferFunction.h"
00029 #include "itkIdentityTransferFunction.h"
00030 #include "itkSumInputFunction.h"
00031 #include "itkProductInputFunction.h"
00032
00033 namespace itk
00034 {
00035 namespace Statistics
00036 {
00037
00038 template<class TVector, class TOutput>
00039 class TwoHiddenLayerBackPropagationNeuralNetwork : public MultilayerNeuralNetworkBase<TVector, TOutput>
00040 {
00041 public:
00042
00043 typedef itk::Statistics::BackPropagationLayer<TVector, TOutput> LayerType;
00044 typedef itk::Statistics::CompletelyConnectedWeightSet<TVector, TOutput> WeightType;
00045
00046 typedef TwoHiddenLayerBackPropagationNeuralNetwork Self;
00047 typedef MultilayerNeuralNetworkBase<TVector, TOutput> Superclass;
00048 typedef SmartPointer<Self> Pointer;
00049 typedef SmartPointer<const Self> ConstPointer;
00050
00051
00052 itkTypeMacro(TwoHiddenLayerBackPropagationNeuralNetwork,
00053 MultilayerNeuralNetworkBase);
00054 itkNewMacro(Self) ;
00055
00056 typedef typename Superclass::ValueType ValueType;
00057
00058
00059
00060 void Initialize();
00061
00062 itkSetMacro(NumOfInputNodes, int);
00063 itkGetConstReferenceMacro(NumOfInputNodes, int);
00064
00065 itkSetMacro(NumOfHiddenNodes1, int);
00066 itkGetConstReferenceMacro(NumOfHiddenNodes1, int);
00067
00068 itkSetMacro(NumOfHiddenNodes2, int);
00069 itkGetConstReferenceMacro(NumOfHiddenNodes2, int);
00070
00071 itkSetMacro(NumOfOutputNodes, int);
00072 itkGetConstReferenceMacro(NumOfOutputNodes, int);
00073
00074 ValueType* GenerateOutput(TVector samplevector);
00075
00076 protected:
00077
00078 TwoHiddenLayerBackPropagationNeuralNetwork();
00079 ~TwoHiddenLayerBackPropagationNeuralNetwork() {};
00080
00082 virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00083
00084 private:
00085
00086 int m_NumOfInputNodes;
00087 int m_NumOfHiddenNodes1;
00088 int m_NumOfHiddenNodes2;
00089 int m_NumOfOutputNodes;
00090 };
00091
00092 }
00093 }
00094
00095 #ifndef ITK_MANUAL_INSTANTIATION
00096 #include "itkTwoHiddenLayerBackPropagationNeuralNetwork.txx"
00097 #endif
00098
00099 #endif
00100