latest version v1.9 - last update 10 Apr 2010 |
a sigmoid activation function More...
#include <ltiMLP.h>
Public Member Functions | |
sigmoidFunctor (const double &theSlope) | |
sigmoidFunctor () | |
virtual bool | apply (dvector &output) const |
virtual bool | apply (const dvector &src, dvector &output) const |
virtual bool | deriv (dvector &output) const |
virtual activationFunctor * | clone () const |
virtual const double & | onValue () const |
virtual const double & | offValue () const |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
a sigmoid activation function
lti::MLP::sigmoidFunctor::sigmoidFunctor | ( | const double & | theSlope | ) | [inline] |
constructor using explicit sigmoid slope
lti::MLP::sigmoidFunctor::sigmoidFunctor | ( | ) | [inline] |
constructor of a sigmoid with slope 1.0
Referenced by clone().
virtual bool lti::MLP::sigmoidFunctor::apply | ( | const dvector & | src, | |
dvector & | output | |||
) | const [inline, virtual] |
the functor operator.
Operates on copy
Implements lti::MLP::activationFunctor.
References lti::genericVector< T >::begin(), lti::genericVector< T >::end(), lti::exp(), lti::genericVector< T >::resize(), and lti::genericVector< T >::size().
virtual bool lti::MLP::sigmoidFunctor::apply | ( | dvector & | output | ) | const [inline, virtual] |
the functor operator
Implements lti::MLP::activationFunctor.
References lti::genericVector< T >::begin(), lti::genericVector< T >::end(), and lti::exp().
virtual activationFunctor* lti::MLP::sigmoidFunctor::clone | ( | ) | const [inline, virtual] |
virtual bool lti::MLP::sigmoidFunctor::deriv | ( | dvector & | output | ) | const [inline, virtual] |
the derivative of the functor
Implements lti::MLP::activationFunctor.
References lti::genericVector< T >::begin(), lti::genericVector< T >::end(), and lti::exp().
virtual const double& lti::MLP::sigmoidFunctor::offValue | ( | ) | const [inline, virtual] |
return value used to represent "false" or "off"
Implements lti::MLP::activationFunctor.
virtual const double& lti::MLP::sigmoidFunctor::onValue | ( | ) | const [inline, virtual] |
return value used to represent "true" or "on"
Implements lti::MLP::activationFunctor.
virtual bool lti::MLP::sigmoidFunctor::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [inline, virtual] |
read the parameters from the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::MLP::activationFunctor.
References lti::ioHandler::readBegin(), and lti::ioHandler::readEnd().
virtual bool lti::MLP::sigmoidFunctor::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [inline, virtual] |
write the parameters in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::MLP::activationFunctor.
References lti::ioHandler::writeBegin(), and lti::ioHandler::writeEnd().