Neuron which computes the hyperbolic tangenst with range [-1,1]. More...
#include <shark/Models/NeuronLayers.h>
Public Types | |
| typedef EmptyState | State |
Public Member Functions | |
| template<class Arg > | |
| void | evalInPlace (Arg &arg) const |
| template<class Arg > | |
| void | evalInPlace (Arg &arg, State &) const |
| template<class Output , class Derivative > | |
| void | multiplyDerivative (Output const &output, Derivative &der, State const &) 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)= 1-f(x)^2 \]
Definition at line 52 of file NeuronLayers.h.
| typedef EmptyState shark::TanhNeuron::State |
Definition at line 53 of file NeuronLayers.h.
|
inline |
Definition at line 55 of file NeuronLayers.h.
Referenced by evalInPlace().
|
inline |
Definition at line 60 of file NeuronLayers.h.
References evalInPlace().
|
inline |
Definition at line 65 of file NeuronLayers.h.
References shark::sqr().