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

Creates a pyramid of the input. More...

#include <ebl_pooling.h>

Inheritance diagram for ebl::pyramid_module< T, Tstate >:
ebl::resizepp_module< T, Tstate > ebl::s2m_module< T, Tstate > ebl::module_1_1< T, Tstate > ebl::module_1_1< T, Tin, Tout > ebl::module ebl::module

List of all members.

Public Member Functions

 pyramid_module (uint nscales, float scaling_ratio, idxdim &dsize, uint mode=MEAN_RESIZE, module_1_1< T, Tstate > *pp=NULL, bool own_pp=false, idxdim *dzpad=NULL, const char *name="pyramid_module")
 pyramid_module (uint nscales, float scaling_ratio, uint mode=MEAN_RESIZE, module_1_1< T, Tstate > *pp=NULL, bool own_pp=false, idxdim *dzpad=NULL, const char *name="pyramid_module")
virtual void fprop (Tstate &in, Tstate &out)
 forward propagation from in to out
virtual void fprop (Tstate &in, mstate< Tstate > &out)
virtual void fprop (Tstate &in, midx< T > &out)
virtual void bprop (Tstate &in, mstate< Tstate > &out)
 backward propagation from in to out (empty)
virtual void bbprop (Tstate &in, mstate< Tstate > &out)
 bbackward propagation from in to out (empty)
virtual mfidxdim bprop_size (mfidxdim &osize)
 Returns input dimensions corresponding to output dimensions 'osize'.
virtual std::string describe ()
 Returns a string describing this module and its parameters.

Protected Attributes

uint nscales
 Number of scales from target size down.
float scaling_ratio
 Ratio between scales.

Detailed Description

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

Creates a pyramid of the input.


Constructor & Destructor Documentation

template<typename T , class Tstate >
ebl::pyramid_module< T, Tstate >::pyramid_module ( uint  nscales,
float  scaling_ratio,
idxdim &  dsize,
uint  mode = MEAN_RESIZE,
module_1_1< T, Tstate > *  pp = NULL,
bool  own_pp = false,
idxdim *  dzpad = NULL,
const char *  name = "pyramid_module< T, Tstate >" 
)

Constructor. Preprocessing module pp will be deleted upon destruction.

Parameters:
nscalesNumber of scales of pyramid, starting from target dimensions down with a subsampling ratio of 2.
ppAn optional pointer to a preprocessing module. If NULL, no preprocessing is performed. This module is responsible for destroying the preprocessing module.
pp_originalPreprocessing for original channel.
add_originalIf true, the first object in the output will be the original preprocessed patch of target size, without Laplacian.
modeThe type of resizing (MEAN_RESIZE, BILINEAR_RESIZE, GAUSSIAN_RESIZE).
sizeThe target dimensions (heightxwidth)
zpadOptional zero-padding is added on each side
template<typename T , class Tstate >
ebl::pyramid_module< T, Tstate >::pyramid_module ( uint  nscales,
float  scaling_ratio,
uint  mode = MEAN_RESIZE,
module_1_1< T, Tstate > *  pp = NULL,
bool  own_pp = false,
idxdim *  dzpad = NULL,
const char *  name = "pyramid_module< T, Tstate >" 
)

Constructor without target dimensions. set_dimensions should be called later. Preprocessing module pp will be deleted upon destruction.

Parameters:
nscalesNumber of scales of pyramid, starting from target dimensions down with a subsampling ratio of 2.
ppAn optional pointer to a preprocessing module. If NULL, no preprocessing is performed. This module is responsible for destroying the preprocessing module.
pp_originalPreprocessing for original channel.
add_originalIf true, the first object in the output will be the original preprocessed patch of target size, without Laplacian.
modeThe type of resizing (MEAN_RESIZE, BILINEAR_RESIZE, GAUSSIAN_RESIZE).
zpadOptional zero-padding is added on each side

Member Function Documentation

template<typename T , class Tstate >
void ebl::pyramid_module< T, Tstate >::fprop ( Tstate &  in,
mstate< Tstate > &  out 
) [virtual]

Process 'in' into 'out' which will contain all scales separated in each state of the multi-state 'out'.

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

template<typename T , class Tstate >
void ebl::pyramid_module< T, Tstate >::fprop ( Tstate &  in,
midx< T > &  out 
) [virtual]

Process 'in' into 'out' which will contain an array of idx, where each idx has different scale with different dimensions.

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


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