|
libeblearn
|
#include <ebl_pooling.h>
Public Member Functions | |
| subsampling_module (parameter< T, Tstate > *p, uint thickness, idxdim &kernel, idxdim &stride, const char *name="subsampling", bool crop=true, bool pad=true) | |
| virtual | ~subsampling_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 void | forget (forget_param_linear &fp) |
| forgetting weights by replacing with random values | |
| virtual int | replicable_order () |
| order of operation | |
| virtual bool | resize_output (Tstate &in, Tstate &out) |
| resize the output based on input dimensions | |
| virtual fidxdim | fprop_size (fidxdim &i_size) |
| virtual fidxdim | bprop_size (const fidxdim &o_size) |
|
virtual subsampling_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) |
Public Attributes | |
| Tstate | coeff |
| Learned averaging coefficients. | |
| Tstate | sub |
| Temporary buffer to hold sum of neighborhood. | |
| uint | thickness |
| Number of features. | |
| idxdim | kernel |
| Dimensions of subsampling kernel. | |
| idxdim | stride |
| Strides of subsampling. | |
Protected Attributes | |
| bool | crop |
| Crop input when size mismatch or not. | |
| bool | pad |
| Pad output when size mismatch or not. | |
This module applies 2D subsampling on dimensions 1 and 2 (0 contains different layers of information). This module has a replicable order of 3, if the input has a bigger order, use the replicable version of this module: subsampling_module_replicable.
| ebl::subsampling_module< T, Tstate >::subsampling_module | ( | parameter< T, Tstate > * | p, |
| uint | thickness, | ||
| idxdim & | kernel, | ||
| idxdim & | stride, | ||
| const char * | name = "subsampling", |
||
| bool | crop = true, |
||
| bool | pad = 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. |
| pad | If true, add padding to end of non-feature dimensions to match the kernel when not matching. |
| fidxdim ebl::subsampling_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.
Just multiply each dimension by its stride
Reimplemented from ebl::module_1_1< T, Tstate >.
| void ebl::subsampling_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::subsampling_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.
Recompute the input size to be compliant with the output
Reimplemented from ebl::module_1_1< T, Tstate >.