#include <online-feat-input.h>
Public Member Functions | |
OnlineLdaInput (OnlineFeatInputItf *input, const Matrix< BaseFloat > &transform, int32 left_context, int32 right_context) | |
virtual bool | Compute (Matrix< BaseFloat > *output) |
virtual int32 | Dim () const |
Public Member Functions inherited from OnlineFeatInputItf | |
virtual | ~OnlineFeatInputItf () |
Private Member Functions | |
void | TransformToOutput (const MatrixBase< BaseFloat > &spliced_feats, Matrix< BaseFloat > *output) |
void | ComputeNextRemainder (const MatrixBase< BaseFloat > &input) |
KALDI_DISALLOW_COPY_AND_ASSIGN (OnlineLdaInput) | |
Static Private Member Functions | |
static void | SpliceFrames (const MatrixBase< BaseFloat > &input1, const MatrixBase< BaseFloat > &input2, const MatrixBase< BaseFloat > &input3, int32 context_window, Matrix< BaseFloat > *output) |
Private Attributes | |
OnlineFeatInputItf * | input_ |
const int32 | input_dim_ |
const int32 | left_context_ |
const int32 | right_context_ |
Matrix< BaseFloat > | linear_transform_ |
Vector< BaseFloat > | offset_ |
Matrix< BaseFloat > | remainder_ |
Definition at line 186 of file online-feat-input.h.
OnlineLdaInput | ( | OnlineFeatInputItf * | input, |
const Matrix< BaseFloat > & | transform, | ||
int32 | left_context, | ||
int32 | right_context | ||
) |
Definition at line 191 of file online-feat-input.cc.
References MatrixBase< Real >::CopyFromMat(), OnlineLdaInput::input_dim_, KALDI_ERR, OnlineLdaInput::linear_transform_, MatrixBase< Real >::NumCols(), MatrixBase< Real >::NumRows(), OnlineLdaInput::offset_, MatrixBase< Real >::Range(), and Matrix< Real >::Resize().
Implements OnlineFeatInputItf.
Definition at line 259 of file online-feat-input.cc.
References OnlineFeatInputItf::Compute(), OnlineLdaInput::ComputeNextRemainder(), rnnlm::i, OnlineLdaInput::input_, OnlineLdaInput::input_dim_, KALDI_ASSERT, OnlineLdaInput::left_context_, OnlineLdaInput::linear_transform_, MatrixBase< Real >::NumCols(), MatrixBase< Real >::NumRows(), OnlineLdaInput::remainder_, Matrix< Real >::Resize(), OnlineLdaInput::right_context_, MatrixBase< Real >::Row(), OnlineLdaInput::SpliceFrames(), and OnlineLdaInput::TransformToOutput().
|
private |
Definition at line 312 of file online-feat-input.cc.
References VectorBase< Real >::CopyFromVec(), rnnlm::i, OnlineLdaInput::input_dim_, OnlineLdaInput::left_context_, MatrixBase< Real >::NumRows(), OnlineLdaInput::remainder_, Matrix< Real >::Resize(), OnlineLdaInput::right_context_, and MatrixBase< Real >::Row().
Referenced by OnlineLdaInput::Compute().
|
inlinevirtual |
Implements OnlineFeatInputItf.
Definition at line 195 of file online-feat-input.h.
References kaldi::SpliceFrames().
|
private |
|
staticprivate |
Definition at line 214 of file online-feat-input.cc.
References VectorBase< Real >::CopyFromVec(), KALDI_ASSERT, MatrixBase< Real >::NumCols(), MatrixBase< Real >::NumRows(), Matrix< Real >::Resize(), and MatrixBase< Real >::Row().
Referenced by OnlineLdaInput::Compute().
|
private |
Definition at line 246 of file online-feat-input.cc.
References MatrixBase< Real >::AddMatMat(), MatrixBase< Real >::AddVecToRows(), kaldi::kNoTrans, kaldi::kTrans, OnlineLdaInput::linear_transform_, MatrixBase< Real >::NumRows(), OnlineLdaInput::offset_, and Matrix< Real >::Resize().
Referenced by OnlineLdaInput::Compute().
|
private |
Definition at line 215 of file online-feat-input.h.
Referenced by OnlineCacheInput::Compute(), and OnlineLdaInput::Compute().
|
private |
Definition at line 216 of file online-feat-input.h.
Referenced by OnlineLdaInput::Compute(), OnlineLdaInput::ComputeNextRemainder(), and OnlineLdaInput::OnlineLdaInput().
|
private |
Definition at line 217 of file online-feat-input.h.
Referenced by OnlineLdaInput::Compute(), and OnlineLdaInput::ComputeNextRemainder().
Definition at line 219 of file online-feat-input.h.
Referenced by OnlineLdaInput::Compute(), OnlineLdaInput::OnlineLdaInput(), and OnlineLdaInput::TransformToOutput().
Definition at line 220 of file online-feat-input.h.
Referenced by OnlineLdaInput::OnlineLdaInput(), and OnlineLdaInput::TransformToOutput().
Definition at line 221 of file online-feat-input.h.
Referenced by OnlineLdaInput::Compute(), and OnlineLdaInput::ComputeNextRemainder().
|
private |
Definition at line 218 of file online-feat-input.h.
Referenced by OnlineLdaInput::Compute(), and OnlineLdaInput::ComputeNextRemainder().