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

The rectifier function, defined by. More...

Static Public Member Functions

static double deriv (const double y)
 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

static double mlpack::ann::RectifierFunction::deriv ( const double  y)
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 deriv().

template<typename InputType , typename OutputType >
static void mlpack::ann::RectifierFunction::deriv ( const InputType &  y,
OutputType &  x 
)
inlinestatic

Computes the first derivatives of the rectifier function.

Parameters
yInput activations.
xThe resulting derivatives.

Definition at line 103 of file rectifier_function.hpp.

References deriv().

static double mlpack::ann::RectifierFunction::fn ( const double  x)
inlinestatic

Computes the rectifier function.

Parameters
xInput data.
Returns
f(x).

Definition at line 54 of file rectifier_function.hpp.

Referenced by fn().

template<typename eT >
static void mlpack::ann::RectifierFunction::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.

template<typename eT >
static void mlpack::ann::RectifierFunction::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 78 of file rectifier_function.hpp.

References fn().


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