SILUFunction Class Reference

The SILU function, defined by. More...

Static Public Member Functions

static double Deriv (const double x)
 Computes the first derivative of the SILU function. More...

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

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

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

 

Detailed Description

The SILU function, defined by.

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

Definition at line 43 of file silu_function.hpp.

Member Function Documentation

◆ Deriv() [1/2]

static double Deriv ( const double  x)
inlinestatic

Computes the first derivative of the SILU function.

Parameters
yInput activation.
Returns
f'(x)

Definition at line 75 of file silu_function.hpp.

◆ Deriv() [2/2]

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

Computes the first derivatives of the SILU function.

Parameters
yInput activations.
xThe resulting derivatives.

Definition at line 88 of file silu_function.hpp.

◆ Fn() [1/2]

static double Fn ( const double  x)
inlinestatic

Computes the SILU function.

Parameters
xInput data.
Returns
f(x).

Definition at line 52 of file silu_function.hpp.

◆ Fn() [2/2]

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

Computes the SILU function.

Parameters
xInput data.
yThe resulting output activation.

Definition at line 64 of file silu_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/silu_function.hpp