shark::TanhNeuron Struct Reference

Neuron which computes the hyperbolic tangenst with range [-1,1]. More...

#include <shark/Models/Neurons.h>

+ Inheritance diagram for shark::TanhNeuron:

Public Member Functions

template<class T >
function (T x) const
 
template<class T >
functionDerivative (T y) const
 

Detailed Description

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)) \]

Definition at line 132 of file Neurons.h.

Member Function Documentation

§ function()

template<class T >
T shark::TanhNeuron::function ( x) const
inline

Definition at line 134 of file Neurons.h.

§ functionDerivative()

template<class T >
T shark::TanhNeuron::functionDerivative ( y) const
inline

Definition at line 138 of file Neurons.h.


The documentation for this struct was generated from the following file: