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
static void Deriv (const InputType &y, OutputType &x)
 Computes the first derivatives of the softplus function. More...

 
static double Fn (const double x)
 Computes the softplus function. More...

 
template
static void Fn (const InputType &x, OutputType &y)
 Computes the softplus function. More...

 
static double Inv (const double y)
 Computes the inverse of the softplus function. More...

 
template
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*}

Definition at line 43 of file softplus_function.hpp.

Member Function Documentation

◆ Deriv() [1/2]

static double 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.

◆ Deriv() [2/2]

static void Deriv ( const InputType &  y,
OutputType &  x 
)
inlinestatic

Computes the first derivatives of the softplus function.

Parameters
yInput data.
xThe resulting derivatives.

Definition at line 93 of file softplus_function.hpp.

◆ Fn() [1/2]

static double Fn ( const double  x)
inlinestatic

Computes the softplus function.

Parameters
xInput data.
Returns
f(x).

Definition at line 52 of file softplus_function.hpp.

Referenced by SoftplusFunction::Fn().

◆ Fn() [2/2]

static void Fn ( const InputType &  x,
OutputType &  y 
)
inlinestatic

Computes the softplus function.

Parameters
xInput data.
yThe resulting output activation.

Definition at line 67 of file softplus_function.hpp.

References SoftplusFunction::Fn().

◆ Inv() [1/2]

static double 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 SoftplusFunction::Inv().

◆ Inv() [2/2]

static void Inv ( const InputType &  y,
OutputType &  x 
)
inlinestatic

Computes the inverse of the softplus function.

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

Definition at line 119 of file softplus_function.hpp.

References SoftplusFunction::Inv().


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-3.4.2/src/mlpack/methods/ann/activation_functions/softplus_function.hpp