libeblearn
|
#include <ebl_pooling.h>
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 |
This module takes a weighted average ofneighborhoods with a stride, e.g. a 5x5 avg pooling with a stride of 2x2.
ebl::wavg_pooling_module< T, Tstate >::wavg_pooling_module | ( | uint | thickness, |
idxdim & | kernel, | ||
idxdim & | stride, | ||
const char * | name = "wavg_pooling" , |
||
bool | crop = true |
||
) |
Constructor.
p | is used to store all parametric variables in a single place. If p is null, a local buffer will be used. |
thickness | The number of features. |
kernel | Size of subsampling kernel (without thickness). |
stride | Stride of subsampling kernel (without thickness). |
crop | If true, crop input when it does not match with the kernel. This allows to feed any input size to this module. |
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 >.
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 >.
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 >.