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

The softplus function, defined by. More...

#include <softplus_function.hpp>

Static Public Member Functions

static double Fn (const double x)
 Computes the softplus function. More...
 
template<typename InputType , typename OutputType >
static void Fn (const InputType &x, OutputType &y)
 Computes the softplus function. More...
 
static double Deriv (const double y)
 Computes the first derivative of the softplus function. More...
 
template<typename InputType , typename OutputType >
static void Deriv (const InputType &y, OutputType &x)
 Computes the first derivatives of the softplus function. More...
 
static double Inv (const double y)
 Computes the inverse of the softplus function. More...
 
template<typename InputType , typename OutputType >
static void Inv (const InputType &y, OutputType &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*}

Member Function Documentation

◆ Deriv() [1/2]

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

Computes the first derivative of the softplus function.

Parameters
yInput data.
Returns
f'(x)

◆ Deriv() [2/2]

template<typename InputType , typename OutputType >
static void mlpack::ann::SoftplusFunction::Deriv ( const InputType &  y,
OutputType &  x 
)
inlinestatic

Computes the first derivatives of the softplus function.

Parameters
yInput data.
xThe resulting derivatives.

◆ Fn() [1/2]

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

Computes the softplus function.

Parameters
xInput data.
Returns
f(x).

◆ Fn() [2/2]

template<typename InputType , typename OutputType >
static void mlpack::ann::SoftplusFunction::Fn ( const InputType &  x,
OutputType &  y 
)
inlinestatic

Computes the softplus function.

Parameters
xInput data.
yThe resulting output activation.

◆ Inv() [1/2]

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

Computes the inverse of the softplus function.

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

◆ Inv() [2/2]

template<typename InputType , typename OutputType >
static void mlpack::ann::SoftplusFunction::Inv ( const InputType &  y,
OutputType &  x 
)
inlinestatic

Computes the inverse of the softplus function.

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

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