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

#include <ebl_normalization.h>

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

List of all members.

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

Detailed Description

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

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.


Constructor & Destructor Documentation

template<typename T , class Tstate >
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 
)
Parameters:
kerdimThe kernel dimensions.
nfThe number of feature maps input to this module.
mirrorUse mirroring of the input to pad border if true, or use zero-padding otherwise (default).
global_normIf true, apply global normalization first.
pIf specified, parameter p holds learned weights.
across_featuresIf true, normalize across feature dimensions in addition to spatial dimensions.
learn_meanIf true, learn mean weighting.
cgaussGaussian kernel coefficient.

Member Function Documentation

template<typename T , class Tstate >
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.

Parameters:
pIf NULL, reuse current parameter space, otherwise allocate new weights on parameter 'p'.

Reimplemented from ebl::module_1_1< T, Tstate >.

template<typename T , class 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 >.

template<typename T , class 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 >.


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