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

#include <ebl_merge.h>

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

List of all members.

Public Member Functions

 merge_module (std::vector< Tstate ** > &inputs, intg concat_dim, const char *name_="merge", const char *list=NULL)
 merge_module (std::vector< mstate< Tstate > ** > &inputs, intg concat_dim, const char *name_="merge", const char *list=NULL)
 Merge multi-state inputs.
 merge_module (std::vector< std::vector< uint > > &states, intg concat_dim, const char *name_="merge")
virtual void fprop (mstate< Tstate > &in, mstate< Tstate > &out)
 forward propagation from in to out
virtual void bprop (mstate< Tstate > &in, mstate< Tstate > &out)
 backward propagation from out to in
virtual void bbprop (mstate< Tstate > &in, mstate< Tstate > &out)
 second-derivative backward propagation from out to in
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 std::string describe ()
 Returns a string describing this module and its parameters.

Protected Member Functions

virtual void merge (mstate< Tstate > &in, Tstate &out)
 Merge all states in 'in' into one state 'out'.

Detailed Description

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

A module that can concatenate multiple inputs. It takes one primary input to which inputs will be concatenated into the output (by allocating a bigger output and copying all data to that output).


Constructor & Destructor Documentation

template<typename T , class Tstate >
ebl::merge_module< T, Tstate >::merge_module ( std::vector< Tstate ** > &  inputs,
intg  concat_dim,
const char *  name_ = "merge",
const char *  list = NULL 
)

Initialize inputs list.

Parameters:
inputsA vector of pointers to the input states pointers to concatenate.
concat_dimInput dimension to assuming all other dimensions have the same size.
template<typename T , class Tstate >
ebl::merge_module< T, Tstate >::merge_module ( std::vector< std::vector< uint > > &  states,
intg  concat_dim,
const char *  name_ = "merge" 
)

Merge multi-state inputs given a vector of vector of indexes to merge, i.e. all states which id are in the first vector are merge together, and this process is repeated for each vector<uint>.


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