libeblearn
|
#include <ebl_normalization.h>
Public Member Functions | |
contrast_norm_module (idxdim &kerdim, int nf, bool mirror=false, bool threshold=true, bool global_norm=false, parameter< T, Tstate > *p=NULL, const char *name="contrast_norm", bool across_features=true, bool learn_mean=false, double cnorm=2.0, bool fsum_div=false, float fsum_split=1.0, double epsilon=1e-6) | |
virtual | ~contrast_norm_module () |
destructor | |
virtual void | fprop (Tstate &in, Tstate &out) |
forward propagation from in to out | |
virtual void | bprop (Tstate &in, Tstate &out) |
backward propagation from out to in | |
virtual void | bbprop (Tstate &in, Tstate &out) |
second-derivative backward propagation from out to in | |
virtual void | dump_fprop (Tstate &in, Tstate &out) |
virtual contrast_norm_module < T, Tstate > * | copy (parameter< T, Tstate > *p=NULL) |
virtual bool | optimize_fprop (Tstate &in, Tstate &out) |
virtual std::string | describe () |
Returns a string describing this module and its parameters. | |
Protected Attributes | |
subtractive_norm_module< T, Tstate > | subnorm |
divisive_norm_module< T, Tstate > | divnorm |
Tstate | tmp |
bool | global_norm |
global norm first | |
bool | learn_mean |
Learn mean weighting. | |
Friends | |
class | contrast_norm_module_gui |
Local contrast normalization operation using a weighted expectation over a local neighborhood. An input set of feature maps is locally normalized to be zero mean and unit standard deviation.
ebl::contrast_norm_module< T, Tstate >::contrast_norm_module | ( | idxdim & | kerdim, |
int | nf, | ||
bool | mirror = false , |
||
bool | threshold = true , |
||
bool | global_norm = false , |
||
parameter< T, Tstate > * | p = NULL , |
||
const char * | name = "contrast_norm" , |
||
bool | across_features = true , |
||
bool | learn_mean = false , |
||
double | cnorm = 2.0 , |
||
bool | fsum_div = false , |
||
float | fsum_split = 1.0 , |
||
double | epsilon = 1e-6 |
||
) |
kerdim | The kernel dimensions. |
nf | The number of feature maps input to this module. |
mirror | Use mirroring of the input to pad border if true, or use zero-padding otherwise (default). |
global_norm | If true, apply global normalization first. |
p | If specified, parameter p holds learned weights. |
across_features | If true, normalize across feature dimensions in addition to spatial dimensions. |
learn_mean | If true, learn mean weighting. |
cgauss | Gaussian kernel coefficient. |
contrast_norm_module< T, Tstate > * ebl::contrast_norm_module< T, Tstate >::copy | ( | parameter< T, Tstate > * | p = NULL | ) | [virtual] |
Returns a deep copy of this module.
p | If NULL, reuse current parameter space, otherwise allocate new weights on parameter 'p'. |
Reimplemented from ebl::module_1_1< T, Tstate >.
void ebl::contrast_norm_module< T, Tstate >::dump_fprop | ( | Tstate & | in, |
Tstate & | out | ||
) | [virtual] |
Calls fprop and then dumps internal buffers, inputs and outputs into files. This can be useful for debugging.
Reimplemented from ebl::module_1_1< T, Tstate >.
bool ebl::contrast_norm_module< T, Tstate >::optimize_fprop | ( | Tstate & | in, |
Tstate & | out | ||
) | [virtual] |
Pre-determine the order of hidden buffers to use only 2 buffers in order to reduce memory footprint. This returns true if outputs is actually put in out, false if it's in in.
Reimplemented from ebl::module_1_1< T, Tstate >.