RectifierFunction Class Reference

The rectifier function, defined by. More...

Static Public Member Functions

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

 
template
<
typename
InputType
,
typename
OutputType
>
static void Deriv (const InputType &y, OutputType &x)
 Computes the first derivatives of the rectifier function. More...

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

 
template
<
typename
eT
>
static void Fn (const arma::Mat< eT > &x, arma::Mat< eT > &y)
 Computes the rectifier function using a dense matrix as input. More...

 
template
<
typename
eT
>
static void Fn (const arma::Cube< eT > &x, arma::Cube< eT > &y)
 Computes the rectifier function using a 3rd-order tensor as input. More...

 

Detailed Description

The rectifier function, defined by.

\begin{eqnarray*} f(x) &=& \max(0, x) \\ f'(x) &=& \left\{ \begin{array}{lr} 1 & : x > 0 \\ 0 & : x \le 0 \end{array} \right. \end{eqnarray*}

Definition at line 45 of file rectifier_function.hpp.

Member Function Documentation

◆ Deriv() [1/2]

static double Deriv ( const double  x)
inlinestatic

Computes the first derivative of the rectifier function.

Parameters
xInput data.
Returns
f'(x)

Definition at line 91 of file rectifier_function.hpp.

Referenced by RectifierFunction::Deriv().

◆ Deriv() [2/2]

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

Computes the first derivatives of the rectifier function.

Parameters
yInput data.
xThe resulting derivatives.

Definition at line 103 of file rectifier_function.hpp.

References RectifierFunction::Deriv().

◆ Fn() [1/3]

static double Fn ( const double  x)
inlinestatic

Computes the rectifier function.

Parameters
xInput data.
Returns
f(x).

Definition at line 54 of file rectifier_function.hpp.

◆ Fn() [2/3]

static void Fn ( const arma::Mat< eT > &  x,
arma::Mat< eT > &  y 
)
inlinestatic

Computes the rectifier function using a dense matrix as input.

Parameters
xInput data.
yThe resulting output activation.

Definition at line 66 of file rectifier_function.hpp.

◆ Fn() [3/3]

static void Fn ( const arma::Cube< eT > &  x,
arma::Cube< eT > &  y 
)
inlinestatic

Computes the rectifier function using a 3rd-order tensor as input.

Parameters
xInput data.
yThe resulting output activation.

Definition at line 79 of file rectifier_function.hpp.


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