GeneralActivationFunction.h

Go to the documentation of this file.
00001 #ifndef CGENERALACTIVATIONFUNCTION_H
00002 #define CGENERALACTIVATIONFUNCTION_H
00003 
00004 namespace gplib
00005   {
00006     /** \addtogroup neuralnet Neural Network filtering */
00007     /* @{ */
00008 
00009     //! The base class for all activation functions in neural network
00010 
00011     /*! The activation function in a neural network node determines the type of
00012      * non-linearity between input and output. We have to implement the activation function
00013      * and its derivative.
00014      */
00015     class GeneralActivationFunction
00016       {
00017     public:
00018       //! The function that maps between the weighted sum that's the input of the neuron and the output
00019       virtual double CalcOutput(const double input) = 0;
00020       //! The derivative of the function defined in CalcOutput
00021       virtual double CalcDeriv(const double input) = 0;
00022       GeneralActivationFunction();
00023       virtual ~GeneralActivationFunction();
00024       };
00025   /* @} */
00026   }
00027 #endif // CGENERALACTIVATIONFUNCTION_H

Generated on Tue May 4 16:52:14 2010 for GPLIB++ by  doxygen 1.5.8