MishFunction Class Reference

The Mish function, defined by. More...

Static Public Member Functions

static double Deriv (const double y)
 Computes the first derivative of the Mish function. More...

 
template
<
typename
InputVecType
,
typename
OutputVecType
>
static void Deriv (const InputVecType &y, OutputVecType &x)
 Computes the first derivatives of the Mish function. More...

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

 
template
<
typename
InputVecType
,
typename
OutputVecType
>
static void Fn (const InputVecType &x, OutputVecType &y)
 Computes the Mish function. More...

 

Detailed Description

The Mish function, defined by.

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

Definition at line 40 of file mish_function.hpp.

Member Function Documentation

◆ Deriv() [1/2]

static double Deriv ( const double  y)
inlinestatic

Computes the first derivative of the Mish function.

Parameters
yInput data.
Returns
f'(x)

Definition at line 74 of file mish_function.hpp.

◆ Deriv() [2/2]

static void Deriv ( const InputVecType &  y,
OutputVecType &  x 
)
inlinestatic

Computes the first derivatives of the Mish function.

Parameters
yInput data.
xThe resulting derivatives.

Definition at line 88 of file mish_function.hpp.

◆ Fn() [1/2]

static double Fn ( const double  x)
inlinestatic

Computes the Mish function.

Parameters
xInput data.
Returns
f(x).

Definition at line 49 of file mish_function.hpp.

◆ Fn() [2/2]

static void Fn ( const InputVecType &  x,
OutputVecType &  y 
)
inlinestatic

Computes the Mish function.

Parameters
xInput data.
yThe resulting output activation.

Definition at line 62 of file mish_function.hpp.


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