libeblearn
|
Creates a pyramid of the input. More...
#include <ebl_pooling.h>
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. |
Creates a pyramid of the input.
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.
nscales | Number of scales of pyramid, starting from target dimensions down with a subsampling ratio of 2. |
pp | An optional pointer to a preprocessing module. If NULL, no preprocessing is performed. This module is responsible for destroying the preprocessing module. |
pp_original | Preprocessing for original channel. |
add_original | If true, the first object in the output will be the original preprocessed patch of target size, without Laplacian. |
mode | The type of resizing (MEAN_RESIZE, BILINEAR_RESIZE, GAUSSIAN_RESIZE). |
size | The target dimensions (heightxwidth) |
zpad | Optional zero-padding is added on each side |
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.
nscales | Number of scales of pyramid, starting from target dimensions down with a subsampling ratio of 2. |
pp | An optional pointer to a preprocessing module. If NULL, no preprocessing is performed. This module is responsible for destroying the preprocessing module. |
pp_original | Preprocessing for original channel. |
add_original | If true, the first object in the output will be the original preprocessed patch of target size, without Laplacian. |
mode | The type of resizing (MEAN_RESIZE, BILINEAR_RESIZE, GAUSSIAN_RESIZE). |
zpad | Optional zero-padding is added on each side |
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 >.
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 >.