mlpack  master
Static Public Member Functions | List of all members
mlpack::ann::SoftplusFunction Class Reference

The softplus function, defined by. More...

Static Public Member Functions

static double deriv (const double y)
 Computes the first derivative of the softplus function. More...
 
template<typename InputVecType , typename OutputVecType >
static void deriv (const InputVecType &y, OutputVecType &x)
 Computes the first derivatives of the softplus function. More...
 
static double fn (const double x)
 Computes the softplus function. More...
 
template<typename InputVecType , typename OutputVecType >
static void fn (const InputVecType &x, OutputVecType &y)
 Computes the softplus function. More...
 
static double inv (const double y)
 Computes the inverse of the softplus function. More...
 
template<typename InputVecType , typename OutputVecType >
static void inv (const InputVecType &y, OutputVecType &x)
 Computes the inverse of the softplus function. More...
 

Detailed Description

The softplus function, defined by.

\begin{eqnarray*} f(x) &=& \ln(1 + e^{x}) \\ f'(x) &=& \frac{1}{1 + e^{-x}} \\ f^{-1}(y) &=& \ln(e^{y} - 1) \end{eqnarray*}

Definition at line 43 of file softplus_function.hpp.

Member Function Documentation

static double mlpack::ann::SoftplusFunction::deriv ( const double  y)
inlinestatic

Computes the first derivative of the softplus function.

Parameters
yInput data.
Returns
f'(x)

Definition at line 81 of file softplus_function.hpp.

template<typename InputVecType , typename OutputVecType >
static void mlpack::ann::SoftplusFunction::deriv ( const InputVecType &  y,
OutputVecType &  x 
)
inlinestatic

Computes the first derivatives of the softplus function.

Parameters
yInput activations.
xThe resulting derivatives.

Definition at line 93 of file softplus_function.hpp.

static double mlpack::ann::SoftplusFunction::fn ( const double  x)
inlinestatic

Computes the softplus function.

Parameters
xInput data.
Returns
f(x).

Definition at line 53 of file softplus_function.hpp.

Referenced by fn().

template<typename InputVecType , typename OutputVecType >
static void mlpack::ann::SoftplusFunction::fn ( const InputVecType &  x,
OutputVecType &  y 
)
inlinestatic

Computes the softplus function.

Parameters
xInput data.
yThe resulting output activation.

Definition at line 67 of file softplus_function.hpp.

References fn().

static double mlpack::ann::SoftplusFunction::inv ( const double  y)
inlinestatic

Computes the inverse of the softplus function.

Parameters
yInput data.
Returns
f^{-1}(y)

Definition at line 104 of file softplus_function.hpp.

Referenced by inv().

template<typename InputVecType , typename OutputVecType >
static void mlpack::ann::SoftplusFunction::inv ( const InputVecType &  y,
OutputVecType &  x 
)
inlinestatic

Computes the inverse of the softplus function.

Parameters
yInput data.
xThe resulting inverse of the input data.

Definition at line 116 of file softplus_function.hpp.

References inv().


The documentation for this class was generated from the following file: