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

This module applies max subsampling. More...

#include <ebl_pooling.h>

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

List of all members.

Public Member Functions

 maxss_module (uint thickness, idxdim &kernel, idxdim &stride, const char *name="maxss")
virtual ~maxss_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 bool resize_output (Tstate &in, Tstate &out)
virtual int replicable_order ()
 order of operation
virtual fidxdim fprop_size (fidxdim &i_size)
virtual fidxdim bprop_size (const fidxdim &o_size)
virtual maxss_module< T, Tstate > * copy (parameter< T, Tstate > *p=NULL)
virtual std::string describe ()
 Returns a string describing this module and its parameters.

Protected Attributes

uint thickness
 Number of features.
idxdim kernel
 Kernel dimensions (1st dim is thickness).
idxdim stride
 Stride dimensions (stride 1 in 1st dim).
idx< int > switches
 Remember max locations.
bool float_precision
 check the precision of the module
bool double_precision
 check the precision of the module
idx< T > indices
 Remember max locations.

Detailed Description

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

This module applies max subsampling.


Constructor & Destructor Documentation

template<typename T , class Tstate >
ebl::maxss_module< T, Tstate >::maxss_module ( uint  thickness,
idxdim &  kernel,
idxdim &  stride,
const char *  name = "maxss" 
)

Constructor.

Parameters:
thicknessThe number of features.
kernelSize of subsampling kernel (without thickness).
strideStride of subsampling kernel (without thickness).

Member Function Documentation

template<typename T , class Tstate >
fidxdim ebl::maxss_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 >.

template<typename T , class Tstate >
maxss_module< T, Tstate > * ebl::maxss_module< T, Tstate >::copy ( parameter< T, Tstate > *  p = NULL) [virtual]

Returns a deep copy of this module.

Parameters:
pIf NULL, reuse current parameter space, otherwise allocate new weights on parameter 'p'.

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

template<typename T , class Tstate >
fidxdim ebl::maxss_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 >.

template<typename T , class Tstate >
bool ebl::maxss_module< T, Tstate >::resize_output ( Tstate &  in,
Tstate &  out 
) [virtual]

resize the output based on input dimensions This returns true if output was resized/reallocated, false otherwise.


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