#ifndef NEURAL_SLOPE_STD_H #define NEURAL_SLOPE_STD_H #include #include "neural/slope.h" namespace Neural { template sigtype tpltanh( sigtype sInput ); template<> float tpltanh( float sInput ); template<> double tpltanh( double sInput ); template<> long double tpltanh( long double sInput ); template class SlopeStd : public Slope { public: SlopeStd( sigtype sSlope=1.0 ) : sSlope( sSlope ) { } virtual ~SlopeStd() { } virtual sigtype operator()( sigtype sInput ) { return tpltanh(2.0*sSlope*sInput); } private: sigtype sSlope; }; }; #endif