TRF Language Model
hrf::AlgLayer Class Reference

#include <hrf-model.h>

Inheritance diagram for hrf::AlgLayer:
trf::Algfb

Public Member Functions

 AlgLayer (Model *p, VecShell< VocabID > x, int nlayer)
 
virtual LogP ClusterSum (int *pSeq, int nLen, int nPos, int nOrder)
 This function need be derived. Calcualte the log probability of each cluster. More...
 
- Public Member Functions inherited from trf::Algfb
 Algfb ()
 
 ~Algfb ()
 
void Prepare (int nLen, int nOrder, int nValueLimit)
 prepare More...
 
void ForwardBackward (int nLen, int nOrder, int nValueLimit)
 forward-backward calculation More...
 
LogP GetMarginalLogProb (int nPos, int *pSubSeq, int nSubLen, double logz=0)
 Get the marginal probability. 'logz' is the input of the log normalization constants. More...
 
LogP GetLogSummation ()
 Get the summation over the sequence, corresponding to the log normalization constants 'logZ'. More...
 

Public Attributes

Modelm_pModel
 
Seq m_seq
 
int m_nlayer
 the layer More...
 
- Public Attributes inherited from trf::Algfb
int m_nOrder
 the order, i.e. the node number at each cluster {x_1,x_2,...,x_n} More...
 
int m_nLen
 the sequence length. More...
 
int m_nValueLimit
 the max-value at each position More...
 
Array< Msg * > m_aAlpha
 the forward message More...
 
Array< Msg * > m_aBeta
 the backward message More...
 

Detailed Description

Definition at line 302 of file hrf-model.h.

Constructor & Destructor Documentation

§ AlgLayer()

hrf::AlgLayer::AlgLayer ( Model p,
VecShell< VocabID x,
int  nlayer 
)

Definition at line 1502 of file hrf-model.cpp.

Member Function Documentation

§ ClusterSum()

LogP hrf::AlgLayer::ClusterSum ( int *  pSeq,
int  nLen,
int  nPos,
int  nOrder 
)
virtual

This function need be derived. Calcualte the log probability of each cluster.

Implements trf::Algfb.

Definition at line 1509 of file hrf-model.cpp.

Member Data Documentation

§ m_nlayer

int hrf::AlgLayer::m_nlayer

the layer

Definition at line 307 of file hrf-model.h.

§ m_pModel

Model* hrf::AlgLayer::m_pModel

Definition at line 305 of file hrf-model.h.

§ m_seq

Seq hrf::AlgLayer::m_seq

Definition at line 306 of file hrf-model.h.


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