HardSigmoidFunction Class Reference

The hard sigmoid function, defined by. More...

Static Public Member Functions

static double Deriv (const double y)
 Computes the first derivatives of hard sigmoid function. More...

 
template
static void Deriv (const InputVecType &y, OutputVecType &x)
 Computes the first derivatives of the hard sigmoid function. More...

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

 
template
static void Fn (const InputVecType &x, OutputVecType &y)
 Computes the hard sigmoid function. More...

 

Detailed Description

The hard sigmoid function, defined by.

\begin{eqnarray*} f(x) &=& \min(1, \max(0, 0.2 * x + 0.5)) \\ f'(x) &=& \left\{ \begin{array}{lr} 0.0 & : x={0,1} \\ 0.2 \end{array} \right. \end{eqnarray*}

Definition at line 34 of file hard_sigmoid_function.hpp.

Member Function Documentation

◆ Deriv() [1/2]

static double Deriv ( const double  y)
inlinestatic

Computes the first derivatives of hard sigmoid function.

Parameters
yInput data.
Returns
f'(x)

Definition at line 69 of file hard_sigmoid_function.hpp.

Referenced by HardSigmoidFunction::Deriv().

◆ Deriv() [2/2]

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

Computes the first derivatives of the hard sigmoid function.

Parameters
yInput data.
xThe resulting derivatives.

Definition at line 85 of file hard_sigmoid_function.hpp.

References HardSigmoidFunction::Deriv().

◆ Fn() [1/2]

static double Fn ( const double  x)
inlinestatic

Computes the hard sigmoid function.

Parameters
xInput data.
Returns
f(x).

Definition at line 43 of file hard_sigmoid_function.hpp.

Referenced by HardSigmoidFunction::Fn().

◆ Fn() [2/2]

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

Computes the hard sigmoid function.

Parameters
xInput data.
yThe resulting output activations.

Definition at line 55 of file hard_sigmoid_function.hpp.

References HardSigmoidFunction::Fn().


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