00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkErrorBackPropagationLearningFunctionBase.h,v $ 00005 Language: C++ 00006 Date: $Date: 2007/09/03 21:17:59 $ 00007 Version: $Revision: 1.3 $ 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 00026 #ifndef __itkErrorBackPropagationLearningFunctionBase_h 00027 #define __itkErrorBackPropagationLearningFunctionBase_h 00028 00029 #include <iostream> 00030 #include "itkLightProcessObject.h" 00031 #include "itkLearningFunctionBase.h" 00032 00033 namespace itk 00034 { 00035 namespace Statistics 00036 { 00037 template<class LayerType, class TTargetVector> 00038 class ErrorBackPropagationLearningFunctionBase : public LearningFunctionBase<typename LayerType::LayerInterfaceType, TTargetVector> 00039 { 00040 public: 00041 typedef ErrorBackPropagationLearningFunctionBase Self; 00042 typedef LearningFunctionBase<typename LayerType::LayerInterfaceType, TTargetVector> Superclass; 00043 typedef SmartPointer<Self> Pointer; 00044 typedef SmartPointer<const Self> ConstPointer; 00045 00046 typedef typename Superclass::ValueType ValueType; 00047 typedef typename LayerType::LayerInterfaceType LayerInterfaceType; 00048 00050 itkTypeMacro(ErrorBackPropagationLearningFunctionBase, LearningFunctionBase); 00051 00053 itkNewMacro(Self); 00054 00055 virtual void Learn( LayerInterfaceType * layer, ValueType learningrate); 00056 virtual void Learn( LayerInterfaceType * layer, TTargetVector error, ValueType learningrate); 00057 00058 protected: 00059 00060 ErrorBackPropagationLearningFunctionBase() {}; 00061 ~ErrorBackPropagationLearningFunctionBase() {}; 00062 00063 virtual void PrintSelf( std::ostream& os, Indent indent ) const; 00064 00065 }; 00066 00067 } // end namespace Statistics 00068 } // end namespace itk 00069 00070 #ifndef ITK_MANUAL_INSTANTIATION 00071 #include "itkErrorBackPropagationLearningFunctionBase.txx" 00072 #endif 00073 00074 #endif 00075