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 44 of file NeuronLayers.h.
typedef EmptyState shark::TanhNeuron::State |
Definition at line 45 of file NeuronLayers.h.
|
inline |
Definition at line 47 of file NeuronLayers.h.
Referenced by evalInPlace(), shark::LogisticNeuron::evalInPlace(), shark::FastSigmoidNeuron::evalInPlace(), shark::RectifierNeuron::evalInPlace(), and shark::SoftmaxNeuron< VectorType >::evalInPlace().
|
inline |
Definition at line 52 of file NeuronLayers.h.
References evalInPlace().
|
inline |
Definition at line 57 of file NeuronLayers.h.