00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkErrorBackPropagationLearningFunctionBase.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/08/02 19:17:37 $ 00007 Version: $Revision: 1.1 $ 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 TOutput> 00038 class ErrorBackPropagationLearningFunctionBase : public LearningFunctionBase<LayerType, TOutput> 00039 { 00040 public: 00041 typedef ErrorBackPropagationLearningFunctionBase Self; 00042 typedef LearningFunctionBase<LayerType, TOutput> Superclass; 00043 typedef SmartPointer<Self> Pointer; 00044 typedef SmartPointer<const Self> ConstPointer; 00045 00046 typedef typename Superclass::ValueType ValueType; 00047 00049 itkTypeMacro(ErrorBackPropagationLearningFunctionBase, LearningFunctionBase); 00050 00052 itkNewMacro(Self); 00053 00054 void Learn(LayerType* layer,ValueType learningrate); 00055 void Learn(LayerType* layer, TOutput error, ValueType learningrate); 00056 00057 protected: 00058 00059 ErrorBackPropagationLearningFunctionBase() {}; 00060 ~ErrorBackPropagationLearningFunctionBase() {}; 00061 00062 virtual void PrintSelf( std::ostream& os, Indent indent ) const; 00063 00064 }; 00065 00066 } // end namespace Statistics 00067 } // end namespace itk 00068 00069 #ifndef ITK_MANUAL_INSTANTIATION 00070 #include "itkErrorBackPropagationLearningFunctionBase.txx" 00071 #endif 00072 00073 #endif