TanhExpFunction Class Reference

The TanhExp function, defined by. More...

Static Public Member Functions

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

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

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

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

 

Detailed Description

The TanhExp function, defined by.

\begin{eqnarray*} f(x) = x * tanh(e^x)\\ f'(x) = tanh(e^x) - x*e^x*(tanh(e^x)^2 - 1)\\ \end{eqnarray*}

Definition at line 42 of file tanh_exponential_function.hpp.

Member Function Documentation

◆ Deriv() [1/2]

static double Deriv ( const double  y)
inlinestatic

Computes the first derivative of the TanhExp function.

Parameters
yInput activation.
Returns
f'(x)

Definition at line 74 of file tanh_exponential_function.hpp.

◆ Deriv() [2/2]

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

Computes the first derivatives of the tanh function.

Parameters
yInput activations.
xThe resulting derivatives.

Definition at line 87 of file tanh_exponential_function.hpp.

◆ Fn() [1/2]

static double Fn ( const double  x)
inlinestatic

Computes the TanhExp function.

Parameters
xInput data.
Returns
f(x).

Definition at line 51 of file tanh_exponential_function.hpp.

◆ Fn() [2/2]

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

Computes the TanhExp function.

Parameters
xInput data.
yThe resulting output activation.

Definition at line 63 of file tanh_exponential_function.hpp.


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