Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkTwoHiddenLayerBackPropagationNeuralNetwork.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTwoHiddenLayerBackPropagationNeuralNetwork.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/06/30 18:32:48 $
00007   Version:   $Revision: 1.5 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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   typedef typename Superclass::NetworkOutputType NetworkOutputType;
00052 
00053   /* Method for creation through the object factory. */
00054   itkTypeMacro(TwoHiddenLayerBackPropagationNeuralNetwork,
00055                MultilayerNeuralNetworkBase);  
00056   itkNewMacro(Self) ;
00057 
00058   typedef typename Superclass::ValueType ValueType;
00059 
00060   //Add the layers to the network.
00061   // 1 input, 1 hidden, 1 output 
00062   void Initialize();
00063 
00064   itkSetMacro(NumOfInputNodes,unsigned int);
00065   itkGetConstReferenceMacro(NumOfInputNodes,unsigned int);
00066 
00067   itkSetMacro(NumOfHiddenNodes1, unsigned int);
00068   itkGetConstReferenceMacro(NumOfHiddenNodes1,unsigned int);
00069 
00070   itkSetMacro(NumOfHiddenNodes2, unsigned int);
00071   itkGetConstReferenceMacro(NumOfHiddenNodes2,unsigned int);
00072 
00073   itkSetMacro(NumOfOutputNodes,unsigned int);
00074   itkGetConstReferenceMacro(NumOfOutputNodes,unsigned int);
00075 
00076   //ValueType* GenerateOutput(TVector samplevector);
00077   virtual NetworkOutputType GenerateOutput(TVector samplevector);
00078 
00079 protected:
00080 
00081   TwoHiddenLayerBackPropagationNeuralNetwork();
00082   ~TwoHiddenLayerBackPropagationNeuralNetwork() {};
00083   
00085   virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00086 
00087 private:
00088 
00089   unsigned int m_NumOfInputNodes;
00090   unsigned int m_NumOfHiddenNodes1;
00091   unsigned int m_NumOfHiddenNodes2;
00092   unsigned int m_NumOfOutputNodes;
00093 };
00094 
00095 } // end namespace Statistics
00096 } // end namespace itk
00097 
00098 #ifndef ITK_MANUAL_INSTANTIATION
00099   #include "itkTwoHiddenLayerBackPropagationNeuralNetwork.txx"
00100 #endif
00101 
00102 #endif
00103 
00104 

Generated at Mon Mar 12 03:15:03 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000