libeblearn
ebl::tanh_shrink_module< T, Tstate > Class Template Reference

#include <ebl_nonlinearity.h>

Inheritance diagram for ebl::tanh_shrink_module< T, Tstate >:
ebl::module_1_1< T, Tstate > ebl::module

List of all members.

Public Member Functions

 tanh_shrink_module (parameter< T, Tstate > *p, intg nf, bool diags=false)
virtual ~tanh_shrink_module ()
 Destructor.
virtual void fprop (Tstate &in, Tstate &out)
 forward
virtual void bprop (Tstate &in, Tstate &out)
 backward
virtual void bbprop (Tstate &in, Tstate &out)
 2nd deriv backward
virtual tanh_shrink_module< T,
Tstate > * 
copy ()
 Returns a deep copy of this module.
virtual std::string describe ()
 Returns a string describing this module and its parameters.

Protected Attributes

intg nfeatures
Tstate abuf
Tstate tbuf
Tstate bbuf
diag_module< T, Tstate > * alpha
diag_module< T, Tstate > * beta
tanh_module< T, Tstate > mtanh
diff_module< T, Tstate > difmod
 difference module
bool diags
 Use coefficients or not.

Detailed Description

template<typename T, class Tstate = bbstate_idx<T>>
class ebl::tanh_shrink_module< T, Tstate >

A smoothed shrinkage module using (x - tanh(x)) that parametrizes the steepnes of the shrinkage operator. This function is useful for learning since there is always gradients flowing through it.


Constructor & Destructor Documentation

template<typename T , class Tstate >
ebl::tanh_shrink_module< T, Tstate >::tanh_shrink_module ( parameter< T, Tstate > *  p,
intg  nf,
bool  diags = false 
)

Constructor.

Parameters:
nfThe number of features.
diagsIf true, alpha and beta coefficients are learned such that the output is: a * x - tanh(b * x)

The documentation for this class was generated from the following files: