Public Member Functions | |
OnlinePreconditionerSimple () | |
void | SetRank (int32 rank) |
void | PreconditionDirections (CuMatrixBase< BaseFloat > *R, CuVectorBase< BaseFloat > *row_prod, BaseFloat *scale) |
Private Member Functions | |
BaseFloat | Eta (int32 N) const |
void | PreconditionDirectionsCpu (MatrixBase< double > *R, VectorBase< double > *row_prod, BaseFloat *scale) |
void | Init (const MatrixBase< double > &R0) |
void | InitDefault (int32 D) |
Private Attributes | |
int32 | rank_ |
double | num_samples_history_ |
double | alpha_ |
double | epsilon_ |
double | delta_ |
Vector< double > | d_t_ |
Matrix< double > | R_t_ |
double | rho_t_ |
Definition at line 28 of file nnet-precondition-online-test.cc.
|
inline |
Definition at line 30 of file nnet-precondition-online-test.cc.
Definition at line 120 of file nnet-precondition-online-test.cc.
References KALDI_ASSERT, and OnlinePreconditionerSimple::num_samples_history_.
Referenced by OnlinePreconditionerSimple::PreconditionDirectionsCpu(), and OnlinePreconditionerSimple::SetRank().
|
private |
Definition at line 108 of file nnet-precondition-online-test.cc.
References rnnlm::i, OnlinePreconditionerSimple::InitDefault(), MatrixBase< Real >::NumCols(), MatrixBase< Real >::NumRows(), and OnlinePreconditionerSimple::PreconditionDirections().
Referenced by OnlinePreconditionerSimple::PreconditionDirectionsCpu(), and OnlinePreconditionerSimple::SetRank().
|
private |
Definition at line 84 of file nnet-precondition-online-test.cc.
References OnlinePreconditionerSimple::d_t_, OnlinePreconditionerSimple::epsilon_, rnnlm::i, KALDI_WARN, OnlinePreconditionerSimple::R_t_, OnlinePreconditionerSimple::rank_, Vector< Real >::Resize(), Matrix< Real >::Resize(), OnlinePreconditionerSimple::rho_t_, and VectorBase< Real >::Set().
Referenced by OnlinePreconditionerSimple::Init(), and OnlinePreconditionerSimple::SetRank().
void PreconditionDirections | ( | CuMatrixBase< BaseFloat > * | R, |
CuVectorBase< BaseFloat > * | row_prod, | ||
BaseFloat * | scale | ||
) |
Definition at line 67 of file nnet-precondition-online-test.cc.
References MatrixBase< Real >::CopyFromMat(), CuMatrixBase< Real >::CopyFromMat(), CuVectorBase< Real >::CopyFromVec(), VectorBase< Real >::CopyFromVec(), and OnlinePreconditionerSimple::PreconditionDirectionsCpu().
Referenced by OnlinePreconditionerSimple::Init(), OnlinePreconditionerSimple::SetRank(), and kaldi::nnet2::UnitTestPreconditionDirectionsOnline().
|
private |
Definition at line 128 of file nnet-precondition-online-test.cc.
References VectorBase< Real >::Add(), VectorBase< Real >::AddDiagMat2(), SpMatrix< Real >::AddMat2(), SpMatrix< Real >::AddMat2Vec(), MatrixBase< Real >::AddMatMat(), MatrixBase< Real >::AddMatSp(), SpMatrix< Real >::AddSp(), PackedMatrix< Real >::AddToDiag(), VectorBase< Real >::AddVec(), OnlinePreconditionerSimple::alpha_, VectorBase< Real >::ApplyFloor(), VectorBase< Real >::ApplyPow(), kaldi::AssertEqual(), MatrixBase< Real >::CopyFromMat(), VectorBase< Real >::CopyFromVec(), OnlinePreconditionerSimple::d_t_, OnlinePreconditionerSimple::delta_, SpMatrix< Real >::Eig(), OnlinePreconditionerSimple::epsilon_, OnlinePreconditionerSimple::Eta(), rnnlm::i, OnlinePreconditionerSimple::Init(), SpMatrix< Real >::Invert(), VectorBase< Real >::InvertElements(), SpMatrix< Real >::IsUnit(), rnnlm::j, KALDI_ASSERT, KALDI_VLOG, KALDI_WARN, kaldi::kNoTrans, kaldi::kTrans, VectorBase< Real >::Max(), VectorBase< Real >::Min(), MatrixBase< Real >::MulRowsVec(), VectorBase< Real >::Norm(), MatrixBase< Real >::NumCols(), MatrixBase< Real >::NumRows(), OnlinePreconditionerSimple::R_t_, OnlinePreconditionerSimple::rho_t_, VectorBase< Real >::Scale(), kaldi::SortSvd(), VectorBase< Real >::Sum(), SpMatrix< Real >::Trace(), kaldi::TraceMatMat(), and kaldi::VecVec().
Referenced by OnlinePreconditionerSimple::PreconditionDirections(), and OnlinePreconditionerSimple::SetRank().
|
inline |
Definition at line 33 of file nnet-precondition-online-test.cc.
References OnlinePreconditionerSimple::Eta(), OnlinePreconditionerSimple::Init(), OnlinePreconditionerSimple::InitDefault(), OnlinePreconditionerSimple::PreconditionDirections(), OnlinePreconditionerSimple::PreconditionDirectionsCpu(), and OnlinePreconditionerSimple::rank_.
Referenced by kaldi::nnet2::UnitTestPreconditionDirectionsOnline().
|
private |
Definition at line 56 of file nnet-precondition-online-test.cc.
Referenced by OnlinePreconditionerSimple::PreconditionDirectionsCpu().
|
private |
Definition at line 61 of file nnet-precondition-online-test.cc.
Referenced by OnlinePreconditionerSimple::InitDefault(), and OnlinePreconditionerSimple::PreconditionDirectionsCpu().
|
private |
Definition at line 58 of file nnet-precondition-online-test.cc.
Referenced by OnlinePreconditionerSimple::PreconditionDirectionsCpu().
|
private |
Definition at line 57 of file nnet-precondition-online-test.cc.
Referenced by OnlinePreconditionerSimple::InitDefault(), and OnlinePreconditionerSimple::PreconditionDirectionsCpu().
|
private |
Definition at line 55 of file nnet-precondition-online-test.cc.
Referenced by OnlinePreconditionerSimple::Eta().
|
private |
Definition at line 62 of file nnet-precondition-online-test.cc.
Referenced by OnlinePreconditionerSimple::InitDefault(), and OnlinePreconditionerSimple::PreconditionDirectionsCpu().
|
private |
Definition at line 54 of file nnet-precondition-online-test.cc.
Referenced by OnlinePreconditionerSimple::InitDefault(), and OnlinePreconditionerSimple::SetRank().
|
private |
Definition at line 63 of file nnet-precondition-online-test.cc.
Referenced by OnlinePreconditionerSimple::InitDefault(), and OnlinePreconditionerSimple::PreconditionDirectionsCpu().