Weighted smooth-1norm activation. More...
#include <weighted-smooth-1norm.hpp>
Public Types | |
| typedef ActivationDataAbstractTpl< Scalar > | ActivationDataAbstract |
| typedef ActivationModelAbstractTpl< Scalar > | Base |
| typedef ActivationDataWeightedSmooth1NormTpl< Scalar > | Data |
| typedef MathBaseTpl< Scalar > | MathBase |
| 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 | |
| ActivationModelWeightedSmooth1NormTpl (const VectorXs &weights, const Scalar delta=Scalar(1.)) | |
| Initialize the weighted smooth-1norm activation model. | |
| virtual void | calc (const std::shared_ptr< ActivationDataAbstract > &data, const Eigen::Ref< const VectorXs > &r) override |
| Compute the weighted smooth-1norm activation. | |
| virtual void | calcDiff (const std::shared_ptr< ActivationDataAbstract > &data, const Eigen::Ref< const VectorXs > &r) override |
| Compute the activation derivatives. | |
| template<typename NewScalar> | |
| ActivationModelWeightedSmooth1NormTpl< NewScalar > | cast () const |
| virtual std::shared_ptr< ActivationDataAbstract > | createData () override |
| Create the weighted smooth-1norm activation data. | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW | CROCODDYL_DERIVED_CAST (ActivationModelBase, ActivationModelWeightedSmooth1NormTpl) typedef _Scalar Scalar |
| Scalar | get_delta () const |
| const VectorXs & | get_weights () const |
| virtual void | print (std::ostream &os) const override |
| Print relevant information of the weighted smooth-1norm model. | |
| void | set_weights (const VectorXs &weights) |
| Public Member Functions inherited from ActivationModelAbstractTpl< _Scalar > | |
| ActivationModelAbstractTpl (const std::size_t nr) | |
| std::size_t | get_nr () const |
Protected Attributes | |
| std::size_t | nr_ |
| Protected Attributes inherited from ActivationModelAbstractTpl< _Scalar > | |
| std::size_t | nr_ |
Additional Inherited Members | |
| Public Attributes inherited from ActivationModelAbstractTpl< _Scalar > | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
Weighted smooth-1norm activation.
This activation function describes a weighted smooth representation of the 1-norm of a residual vector:
![\[ a(\mathbf{r}) =
\sum_{i=0}^{nr-1}
w_i\delta^2\left(\sqrt{1 + (r_i/\delta)^2} - 1\right),
\]](form_44.png)
where 




The weights scale the activation without changing the smoothing transition, which occurs around 



Definition at line 40 of file weighted-smooth-1norm.hpp.
| typedef MathBaseTpl<Scalar> MathBase |
Definition at line 48 of file weighted-smooth-1norm.hpp.
| typedef ActivationModelAbstractTpl<Scalar> Base |
Definition at line 49 of file weighted-smooth-1norm.hpp.
| typedef ActivationDataAbstractTpl<Scalar> ActivationDataAbstract |
Definition at line 50 of file weighted-smooth-1norm.hpp.
| typedef ActivationDataWeightedSmooth1NormTpl<Scalar> Data |
Definition at line 51 of file weighted-smooth-1norm.hpp.
| typedef MathBase::VectorXs VectorXs |
Definition at line 52 of file weighted-smooth-1norm.hpp.
| inlineexplicit |
Initialize the weighted smooth-1norm activation model.
| [in] | weights | Nonnegative residual weights |
| [in] | delta | Strictly positive smoothing scale (default: 1) |
Definition at line 60 of file weighted-smooth-1norm.hpp.
| inlineoverridevirtual |
Compute the weighted smooth-1norm activation.
| [in] | data | Weighted smooth-1norm activation data |
| [in] | r | Residual vector |
Implements ActivationModelAbstractTpl< _Scalar >.
Definition at line 77 of file weighted-smooth-1norm.hpp.
| inlineoverridevirtual |
Compute the activation derivatives.
| [in] | data | Weighted smooth-1norm activation data |
| [in] | r | Residual vector |
Implements ActivationModelAbstractTpl< _Scalar >.
Definition at line 98 of file weighted-smooth-1norm.hpp.
| inlineoverridevirtual |
Create the weighted smooth-1norm activation data.
Reimplemented from ActivationModelAbstractTpl< _Scalar >.
Definition at line 118 of file weighted-smooth-1norm.hpp.
| inline |
Definition at line 123 of file weighted-smooth-1norm.hpp.
| inline |
Definition at line 129 of file weighted-smooth-1norm.hpp.
| inline |
Definition at line 130 of file weighted-smooth-1norm.hpp.
| inline |
Definition at line 132 of file weighted-smooth-1norm.hpp.
| inlineoverridevirtual |
Print relevant information of the weighted smooth-1norm model.
| [out] | os | Output stream object |
Reimplemented from ActivationModelAbstractTpl< _Scalar >.
Definition at line 147 of file weighted-smooth-1norm.hpp.
| protected |
Definition at line 68 of file activation-base.hpp.