shark::FastSigmoidNeuron Struct Reference

Fast sigmoidal function, which does not need to compute an exponential function. 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 &state) const
 

Detailed Description

Fast sigmoidal function, which does not need to compute an exponential function.

It is defined as

\[ f(x)=\frac x {1+|x|}\]

it's derivative can be computed as

\[ f'(x)= (1 - |f(x)|)^2 \]

Definition at line 104 of file NeuronLayers.h.

Member Typedef Documentation

◆ State

Definition at line 105 of file NeuronLayers.h.

Member Function Documentation

◆ evalInPlace() [1/2]

template<class Arg >
void shark::FastSigmoidNeuron::evalInPlace ( Arg &  arg) const
inline

Definition at line 107 of file NeuronLayers.h.

Referenced by evalInPlace().

◆ evalInPlace() [2/2]

template<class Arg >
void shark::FastSigmoidNeuron::evalInPlace ( Arg &  arg,
State  
) const
inline

Definition at line 112 of file NeuronLayers.h.

References evalInPlace().

◆ multiplyDerivative()

template<class Output , class Derivative >
void shark::FastSigmoidNeuron::multiplyDerivative ( Output const &  output,
Derivative &  der,
State const &  state 
) const
inline

Definition at line 117 of file NeuronLayers.h.

References shark::sqr().


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