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

#include <ebl_pooling.h>

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

List of all members.

Public Member Functions

 wavg_pooling_module (uint thickness, idxdim &kernel, idxdim &stride, const char *name="wavg_pooling", bool crop=true)
virtual ~wavg_pooling_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 wavg_pooling_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
convolution_module< T, Tstate > * conv
 Crop input when size mismatch or not.
parameter< T, Tstate > param

Detailed Description

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

This module takes a weighted average ofneighborhoods with a stride, e.g. a 5x5 avg pooling with a stride of 2x2.


Constructor & Destructor Documentation

template<typename T , class Tstate >
ebl::wavg_pooling_module< T, Tstate >::wavg_pooling_module ( uint  thickness,
idxdim &  kernel,
idxdim &  stride,
const char *  name = "wavg_pooling",
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::wavg_pooling_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::wavg_pooling_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::wavg_pooling_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 >.


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