IdentityFunction Class Reference

The identity function, defined by. More...

Static Public Member Functions

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

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

 
template
<
typename
eT
>
static void Deriv (const arma::Cube< eT > &y, arma::Cube< eT > &x)
 Computes the first derivatives of the identity function using a 3rd order tensor as input. More...

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

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

 

Detailed Description

The identity function, defined by.

\begin{eqnarray*} f(x) &=& x \\ f'(x) &=& 1 \end{eqnarray*}

Definition at line 28 of file identity_function.hpp.

Member Function Documentation

◆ Deriv() [1/3]

static double Deriv ( const double  )
inlinestatic

Computes the first derivative of the identity function.

Parameters
*(x) Input data.
Returns
f'(x)

Definition at line 60 of file identity_function.hpp.

◆ Deriv() [2/3]

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

Computes the first derivatives of the identity function.

Parameters
yInput data/activation.
xThe resulting derivatives.

Definition at line 72 of file identity_function.hpp.

◆ Deriv() [3/3]

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

Computes the first derivatives of the identity function using a 3rd order tensor as input.

Parameters
yInput activations.
xThe resulting derivatives.

Definition at line 85 of file identity_function.hpp.

◆ Fn() [1/2]

static double Fn ( const double  x)
inlinestatic

Computes the identity function.

Parameters
xInput data.
Returns
f(x).

Definition at line 37 of file identity_function.hpp.

◆ Fn() [2/2]

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

Computes the identity function.

Parameters
xInput data.
yThe resulting output activation.

Definition at line 49 of file identity_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/identity_function.hpp