|
libeblearn
|
#include <ebl_nonlinearity.h>
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. | |
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.
| ebl::tanh_shrink_module< T, Tstate >::tanh_shrink_module | ( | parameter< T, Tstate > * | p, |
| intg | nf, | ||
| bool | diags = false |
||
| ) |
Constructor.
| nf | The number of features. |
| diags | If true, alpha and beta coefficients are learned such that the output is: a * x - tanh(b * x) |