Quadratic-flat-log activation. More...
#include <quadratic-flat-log.hpp>
Public Types | |
typedef ActivationDataAbstractTpl< Scalar > | ActivationDataAbstract |
typedef ActivationModelAbstractTpl< Scalar > | Base |
typedef ActivationDataQuadFlatLogTpl< Scalar > | Data |
typedef MathBaseTpl< Scalar > | MathBase |
typedef MathBase::MatrixXs | MatrixXs |
typedef MathBase::VectorXs | VectorXs |
Public Types inherited from ActivationModelAbstractTpl< _Scalar > | |
typedef ActivationDataAbstractTpl< Scalar > | ActivationDataAbstract |
typedef MathBaseTpl< Scalar > | MathBase |
typedef MathBase::MatrixXs | MatrixXs |
typedef MathBase::VectorXs | VectorXs |
Public Member Functions | |
ActivationModelQuadFlatLogTpl (const std::size_t &nr, const Scalar &alpha=Scalar(1.)) | |
virtual void | calc (const boost::shared_ptr< ActivationDataAbstract > &data, const Eigen::Ref< const VectorXs > &r) |
virtual void | calcDiff (const boost::shared_ptr< ActivationDataAbstract > &data, const Eigen::Ref< const VectorXs > &r) |
virtual boost::shared_ptr< ActivationDataAbstract > | createData () |
Scalar | get_alpha () const |
virtual void | print (std::ostream &os) const |
Print relevant information of the quadratic flat-log model. More... | |
void | set_alpha (const Scalar alpha) |
Public Member Functions inherited from ActivationModelAbstractTpl< _Scalar > | |
ActivationModelAbstractTpl (const std::size_t nr) | |
std::size_t | get_nr () const |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
Public Attributes inherited from ActivationModelAbstractTpl< _Scalar > | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
Protected Attributes | |
std::size_t | nr_ |
Protected Attributes inherited from ActivationModelAbstractTpl< _Scalar > | |
std::size_t | nr_ |
Quadratic-flat-log activation.
This activation function describes a logarithmic quadratic activation depending on the quadratic norm of a residual vector, i.e.
\[ \begin{equation} log(1 + \|\mathbf{r}\|^2 / \alpha) \end{equation} \]
where \(\alpha\) defines the width of the quadratic basin, \(r\) is the scalar residual, \(nr\) is the dimension of the residual vector.
The computation of the function and it derivatives are carried out in calc()
and caldDiff()
, respectively.
calc()
, calcDiff()
, createData()
Definition at line 33 of file quadratic-flat-log.hpp.
|
inlinevirtual |
Print relevant information of the quadratic flat-log model.
[out] | os | Output stream object |
Reimplemented from ActivationModelAbstractTpl< _Scalar >.
Definition at line 123 of file quadratic-flat-log.hpp.