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

#include <ebl_arch.h>

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

List of all members.

Public Member Functions

 narrow_module (int d, intg size, intg offset, bool narrow_states=false)
 narrow_module (int d, intg size, vector< intg > &offsets, bool narrow_states=false, const char *name="narrow")
virtual ~narrow_module ()
 Destructor.
virtual void fprop (mstate< Tstate > &in, mstate< Tstate > &out)
virtual void bprop (mstate< Tstate > &in, mstate< Tstate > &out)
virtual void bbprop (mstate< Tstate > &in, mstate< Tstate > &out)
virtual void fprop (Tstate &in, Tstate &out)
virtual std::string describe ()
 Returns a string describing this module and its parameters.
virtual narrow_module< T,
Tstate > * 
copy ()
 Returns a deep copy of current module.
virtual mfidxdim fprop_size (mfidxdim &isize)
virtual mfidxdim bprop_size (mfidxdim &osize)

Protected Attributes

int dim
 Dimension to be narrowed.
intg size
 Target size for narrowed dimension.
vector< intg > offsets
 Offset in input for narrowing.
bool narrow_states
 Narrow states instead of multi-states.

Detailed Description

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

This module narrow's its input into its output. By default, it narrows the number of states of multi-state inputs, but it can also narrow each state themselves.


Constructor & Destructor Documentation

template<typename T , class Tstate >
ebl::narrow_module< T, Tstate >::narrow_module ( int  d,
intg  size,
intg  offset,
bool  narrow_states = false 
)

Construct a narrow module, narrowing dimension 'd' of input to 'size', starting at 'offset'.

Parameters:
narrow_statesNarrow each state of multi-states instead of narrowing multi-state themselves.
template<typename T , class Tstate >
ebl::narrow_module< T, Tstate >::narrow_module ( int  d,
intg  size,
vector< intg > &  offsets,
bool  narrow_states = false,
const char *  name = "narrow" 
)

Construct a narrow module, narrowing dimension 'd' of input to 'size', starting at multiple 'offsets'.

Parameters:
narrow_statesNarrow each state of multi-states instead of narrowing multi-state themselves.

Member Function Documentation

template<typename T , class Tstate >
mfidxdim ebl::narrow_module< T, Tstate >::bprop_size ( mfidxdim &  osize) [virtual]

Returns input dimensions corresponding to multiple output dimensions 'osize'. Implementation of this method helps automatic scaling of input data but is optional.

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

template<typename T , class Tstate >
mfidxdim ebl::narrow_module< T, Tstate >::fprop_size ( mfidxdim &  isize) [virtual]

Modifies multi-input dimensions 'isize' to be compliant with module's architecture, and returns corresponding output dimensions. Implementation of this method helps automatic scaling of input data but is optional.

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


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