libeblearn
|
#include <ebl_arch.h>
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. |
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.
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'.
narrow_states | Narrow each state of multi-states instead of narrowing multi-state themselves. |
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'.
narrow_states | Narrow each state of multi-states instead of narrowing multi-state themselves. |
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 >.
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 >.