shark::FastSigmoidNeuron Struct Reference

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

#include <shark/Models/Neurons.h>

+ Inheritance diagram for shark::FastSigmoidNeuron:
+ Collaboration diagram for shark::FastSigmoidNeuron:

Static Public Member Functions

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

Additional Inherited Members

- Public Member Functions inherited from shark::detail::NeuronBase< FastSigmoidNeuron >
vector_unary< E, Function
< typename E::value_type > > 
operator() (blas::vector_expression< E > const &x) const
 for a given input vector, calculates the elementwise application of the sigmoid function defined by Derived. More...
 
matrix_unary< E, Function
< typename E::value_type > > 
operator() (blas::matrix_expression< E > const &x) const
 for a given batch of input vectors, calculates the elementwise application of the sigmoid function defined by Derived. More...
 
blas::vector_unary< E,
Function< typename
E::value_type > > 
operator() (blas::vector_expression< E > const &x) const
 for a given input vector, calculates the elementwise application of the sigmoid function defined by Derived. More...
 
blas::matrix_unary< E,
Function< typename
E::value_type > > 
operator() (blas::matrix_expression< E > const &x) const
 for a given batch of input vectors, calculates the elementwise application of the sigmoid function defined by Derived. More...
 
vector_unary< E,
FunctionDerivative< typename
E::value_type > > 
derivative (blas::vector_expression< E > const &x) const
 
matrix_unary< E,
FunctionDerivative< typename
E::value_type > > 
derivative (blas::matrix_expression< E > const &x) const
 
blas::vector_unary< E,
FunctionDerivative< typename
E::value_type > > 
derivative (blas::vector_expression< E > const &x) const
 
blas::matrix_unary< E,
FunctionDerivative< typename
E::value_type > > 
derivative (blas::matrix_expression< E > const &x) 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 153 of file Neurons.h.

Member Function Documentation

template<class T >
static T shark::FastSigmoidNeuron::function ( x)
inlinestatic

Definition at line 155 of file Neurons.h.

template<class T >
static T shark::FastSigmoidNeuron::functionDerivative ( y)
inlinestatic

Definition at line 159 of file Neurons.h.

References shark::sqr().


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