The hard sigmoid function, defined by.
More...
#include <hard_sigmoid_function.hpp>
|
| static double | Fn (const double x) |
| | Computes the hard sigmoid function. More...
|
| |
| template<typename InputVecType , typename OutputVecType > |
| static void | Fn (const InputVecType &x, OutputVecType &y) |
| | Computes the hard sigmoid function. More...
|
| |
| static double | Deriv (const double y) |
| | Computes the first derivatives of hard sigmoid function. More...
|
| |
| template<typename InputVecType , typename OutputVecType > |
| static void | Deriv (const InputVecType &y, OutputVecType &x) |
| | Computes the first derivatives of the hard sigmoid function. More...
|
| |
The hard sigmoid function, defined by.
\begin{eqnarray*} f(x) &=& \min(1, \max(0, 0.2 * x + 0.5)) \\ f'(x) &=& \left\{ \begin{array}{lr} 0.0 & : x={0,1} \\ 0.2 \end{array} \right. \end{eqnarray*}
◆ Deriv() [1/2]
| static double mlpack::ann::HardSigmoidFunction::Deriv |
( |
const double |
y | ) |
|
|
inlinestatic |
Computes the first derivatives of hard sigmoid function.
- Parameters
-
- Returns
- f'(x)
◆ Deriv() [2/2]
template<typename InputVecType , typename OutputVecType >
| static void mlpack::ann::HardSigmoidFunction::Deriv |
( |
const InputVecType & |
y, |
|
|
OutputVecType & |
x |
|
) |
| |
|
inlinestatic |
Computes the first derivatives of the hard sigmoid function.
- Parameters
-
| y | Input data. |
| x | The resulting derivatives. |
◆ Fn() [1/2]
| static double mlpack::ann::HardSigmoidFunction::Fn |
( |
const double |
x | ) |
|
|
inlinestatic |
Computes the hard sigmoid function.
- Parameters
-
- Returns
- f(x).
◆ Fn() [2/2]
template<typename InputVecType , typename OutputVecType >
| static void mlpack::ann::HardSigmoidFunction::Fn |
( |
const InputVecType & |
x, |
|
|
OutputVecType & |
y |
|
) |
| |
|
inlinestatic |
Computes the hard sigmoid function.
- Parameters
-
| x | Input data. |
| y | The resulting output activations. |
The documentation for this class was generated from the following file: