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

The SILU function, defined by. More...

#include <silu_function.hpp>

Static Public Member Functions

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

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

Member Function Documentation

◆ Deriv() [1/2]

static double mlpack::ann::SILUFunction::Deriv ( const double  x)
inlinestatic

Computes the first derivative of the SILU function.

Parameters
yInput activation.
Returns
f'(x)

◆ Deriv() [2/2]

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

Computes the first derivatives of the SILU function.

Parameters
yInput activations.
xThe resulting derivatives.

◆ Fn() [1/2]

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

Computes the SILU function.

Parameters
xInput data.
Returns
f(x).

◆ Fn() [2/2]

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

Computes the SILU function.

Parameters
xInput data.
yThe resulting output activation.

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