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

#include <ebl_pooling.h>

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

List of all members.

Public Member Functions

 lppooling_module (uint thickness, idxdim &kernel, idxdim &stride, uint lppower=2, const char *name="lppooling", bool crop=true)
virtual ~lppooling_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 fidxdim fprop_size (fidxdim &i_size)
virtual fidxdim bprop_size (const fidxdim &o_size)
virtual lppooling_module< T,
Tstate > * 
copy ()
 Returns a deep copy of this module.
virtual std::string describe ()
 Returns a string describing this module and its parameters.
virtual void dump_fprop (Tstate &in, Tstate &out)

Protected Attributes

uint thickness
 Number of features.
idxdim kernel
 Dimensions of subsampling kernel.
idxdim stride
 Strides of subsampling.
bool crop
uint lp_pow
 Crop input when size mismatch or not.
convolution_module< T, Tstate > * conv
power_module< T, Tstate > sqmod
power_module< T, Tstate > sqrtmod
Tstate squared
Tstate convolved
 Intermediate buffer.
parameter< T, Tstate > param

Detailed Description

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

This module takes the l2 norm of neighborhoods with a stride, e.g. a 5x5 l2 pooling with a stride of 2x2.


Constructor & Destructor Documentation

template<typename T , class Tstate >
ebl::lppooling_module< T, Tstate >::lppooling_module ( uint  thickness,
idxdim &  kernel,
idxdim &  stride,
uint  lppower = 2,
const char *  name = "lppooling",
bool  crop = true 
)

Constructor.

Parameters:
pis used to store all parametric variables in a single place. If p is null, a local buffer will be used.
thicknessThe number of features.
kernelSize of subsampling kernel (without thickness).
strideStride of subsampling kernel (without thickness).
cropIf true, crop input when it does not match with the kernel. This allows to feed any input size to this module.

Member Function Documentation

template<typename T , class Tstate >
fidxdim ebl::lppooling_module< T, Tstate >::bprop_size ( const fidxdim &  o_size) [virtual]

Return dimensions compatible with this module given output dimensions. See module_1_1_gen's documentation for more details.

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

template<typename T , class Tstate >
void ebl::lppooling_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 >
fidxdim ebl::lppooling_module< T, Tstate >::fprop_size ( fidxdim &  i_size) [virtual]

Return dimensions that are compatible with this module. See module_1_1_gen's documentation for more details.

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


Member Data Documentation

template<typename T, class Tstate = bbstate_idx<T>>
uint ebl::lppooling_module< T, Tstate >::lp_pow [protected]

Crop input when size mismatch or not.

the P in LP Pooling


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