The softplus function, defined by.
More...
#include <softplus_function.hpp>
|
static double | Fn (const double x) |
| Computes the softplus function. More...
|
|
template<typename InputType , typename OutputType > |
static void | Fn (const InputType &x, OutputType &y) |
| Computes the softplus function. More...
|
|
static double | Deriv (const double y) |
| Computes the first derivative of the softplus function. More...
|
|
template<typename InputType , typename OutputType > |
static void | Deriv (const InputType &y, OutputType &x) |
| Computes the first derivatives of the softplus function. More...
|
|
static double | Inv (const double y) |
| Computes the inverse of the softplus function. More...
|
|
template<typename InputType , typename OutputType > |
static void | Inv (const InputType &y, OutputType &x) |
| Computes the inverse of the softplus function. More...
|
|
The softplus function, defined by.
\begin{eqnarray*} f(x) &=& \ln(1 + e^{x}) \\ f'(x) &=& \frac{1}{1 + e^{-x}} \\ f^{-1}(y) &=& \ln(e^{y} - 1) \end{eqnarray*}
◆ Deriv() [1/2]
static double mlpack::ann::SoftplusFunction::Deriv |
( |
const double |
y | ) |
|
|
inlinestatic |
Computes the first derivative of the softplus function.
- Parameters
-
- Returns
- f'(x)
◆ Deriv() [2/2]
template<typename InputType , typename OutputType >
static void mlpack::ann::SoftplusFunction::Deriv |
( |
const InputType & |
y, |
|
|
OutputType & |
x |
|
) |
| |
|
inlinestatic |
Computes the first derivatives of the softplus function.
- Parameters
-
y | Input data. |
x | The resulting derivatives. |
◆ Fn() [1/2]
static double mlpack::ann::SoftplusFunction::Fn |
( |
const double |
x | ) |
|
|
inlinestatic |
Computes the softplus function.
- Parameters
-
- Returns
- f(x).
◆ Fn() [2/2]
template<typename InputType , typename OutputType >
static void mlpack::ann::SoftplusFunction::Fn |
( |
const InputType & |
x, |
|
|
OutputType & |
y |
|
) |
| |
|
inlinestatic |
Computes the softplus function.
- Parameters
-
x | Input data. |
y | The resulting output activation. |
◆ Inv() [1/2]
static double mlpack::ann::SoftplusFunction::Inv |
( |
const double |
y | ) |
|
|
inlinestatic |
Computes the inverse of the softplus function.
- Parameters
-
- Returns
- f^{-1}(y)
◆ Inv() [2/2]
template<typename InputType , typename OutputType >
static void mlpack::ann::SoftplusFunction::Inv |
( |
const InputType & |
y, |
|
|
OutputType & |
x |
|
) |
| |
|
inlinestatic |
Computes the inverse of the softplus function.
- Parameters
-
y | Input data. |
x | The resulting inverse of the input data. |
The documentation for this class was generated from the following file: