Stats for fMLLR subspace estimation. More...
#include <basis-fmllr-diag-gmm.h>
Public Member Functions | |
BasisFmllrAccus () | |
BasisFmllrAccus (int32 dim) | |
void | ResizeAccus (int32 dim) |
void | Write (std::ostream &out_stream, bool binary) const |
Routines for reading and writing stats. More... | |
void | Read (std::istream &in_stream, bool binary, bool add=false) |
void | AccuGradientScatter (const AffineXformStats &spk_stats) |
Accumulate gradient scatter for one (training) speaker. More... | |
Public Attributes | |
SpMatrix< BaseFloat > | grad_scatter_ |
Gradient scatter. Dim is [(D+1)*D] [(D+1)*D]. More... | |
int32 | dim_ |
Feature dimension. More... | |
double | beta_ |
Occupancy count. More... | |
Stats for fMLLR subspace estimation.
This class is only to estimate the "basis", which is done in training time. Class BasisFmllrEstimate contains the functions that are used in test time. (see the function BasisFmllrCoefficients()).
Definition at line 73 of file basis-fmllr-diag-gmm.h.
|
inline |
Definition at line 76 of file basis-fmllr-diag-gmm.h.
|
inlineexplicit |
Definition at line 77 of file basis-fmllr-diag-gmm.h.
void AccuGradientScatter | ( | const AffineXformStats & | spk_stats | ) |
Accumulate gradient scatter for one (training) speaker.
To finish the process, we need to traverse the whole training set. Parallelization works if the speaker list is splitted, and stats are summed up by setting add=true in BasisFmllrEstimate:: ReadBasis. See section 5.2 of the paper.
Definition at line 91 of file basis-fmllr-diag-gmm.cc.
References MatrixBase< Real >::AddMat(), AffineXformStats::beta_, BasisFmllrAccus::beta_, VectorBase< Real >::CopyRowsFromMat(), rnnlm::d, BasisFmllrAccus::dim_, AffineXformStats::G_, BasisFmllrAccus::grad_scatter_, AffineXformStats::K_, MatrixBase< Real >::Row(), MatrixBase< Real >::Scale(), and MatrixBase< Real >::SetUnit().
Definition at line 66 of file basis-fmllr-diag-gmm.cc.
References BasisFmllrAccus::beta_, kaldi::ExpectToken(), BasisFmllrAccus::grad_scatter_, and kaldi::ReadBasicType().
void ResizeAccus | ( | int32 | dim | ) |
Definition at line 82 of file basis-fmllr-diag-gmm.cc.
References BasisFmllrAccus::grad_scatter_, KALDI_ERR, and kaldi::kSetZero.
void Write | ( | std::ostream & | out_stream, |
bool | binary | ||
) | const |
Routines for reading and writing stats.
Definition at line 53 of file basis-fmllr-diag-gmm.cc.
References BasisFmllrAccus::beta_, BasisFmllrAccus::grad_scatter_, kaldi::WriteBasicType(), and kaldi::WriteToken().
double beta_ |
Occupancy count.
Definition at line 101 of file basis-fmllr-diag-gmm.h.
Referenced by BasisFmllrAccus::AccuGradientScatter(), BasisFmllrEstimate::EstimateFmllrBasis(), BasisFmllrAccus::Read(), and BasisFmllrAccus::Write().
int32 dim_ |
Feature dimension.
Definition at line 99 of file basis-fmllr-diag-gmm.h.
Referenced by BasisFmllrAccus::AccuGradientScatter(), BasisFmllrEstimate::ComputeAmDiagPrecond(), BasisFmllrEstimate::ComputeTransform(), BasisFmllrEstimate::EstimateFmllrBasis(), and BasisFmllrEstimate::Read().
Gradient scatter. Dim is [(D+1)*D] [(D+1)*D].
Definition at line 97 of file basis-fmllr-diag-gmm.h.
Referenced by BasisFmllrAccus::AccuGradientScatter(), BasisFmllrEstimate::EstimateFmllrBasis(), BasisFmllrAccus::Read(), BasisFmllrAccus::ResizeAccus(), and BasisFmllrAccus::Write().