Neuron which computes the hyperbolic tangenst with range [-1,1]. More...
#include <shark/Models/Neurons.h>
Public Member Functions | |
template<class T > | |
T | function (T x) const |
template<class T > | |
T | functionDerivative (T y) const |
Neuron which computes the hyperbolic tangenst with range [-1,1].
The Tanh function is
\[ f(x)=\tanh(x) = \frac 2 {1+exp^(-2x)}-1 \]
it's derivative can be computed as
\[ f'(x)= f(x)(1-f(x)) \]
|
inline |
|
inline |