36   std::vector< SpMatrix<double> > Q_num, Q_den, H, S_means;
    45     std::vector< SpMatrix<double> > S_means_tmp;
    47     for (
size_t i = 0; 
i < S_means.size(); 
i++)
    48       S_means[
i].AddSp(-1.0, S_means_tmp[
i]);
    65   if (flags & kSgmmPhoneProjections)
    66     tot_impr += 
UpdateM(num_accs, den_accs, Q_num, Q_den,
    67                         gamma_num, gamma_den, model);
    70     tot_impr += 
UpdateW(num_accs, den_accs, gamma_num, gamma_den, model);
    73     tot_impr += 
UpdateU(num_accs, den_accs, gamma_num, gamma_den, model);
    75   if (flags & kSgmmCovarianceMatrix)
    77                            gamma_num, gamma_den, S_means, model);
    83     tot_impr += 
UpdateN(num_accs, den_accs, gamma_num, gamma_den, model);
    86   if (auxf_change_out) *auxf_change_out = tot_impr * num_accs.
total_frames_;
    91     KALDI_WARN << 
"Num and den frame counts differ, "    96   KALDI_LOG << 
"***Averaged differenced likelihood per frame is "    99   KALDI_LOG << 
"***Note: for this to be at all meaningful, if you use "   100             << 
"\"canceled\" stats you will have to renormalize this over "   101             << 
"the \"real\" frame count.";
   116       updater_(updater), num_accs_(num_accs), den_accs_(den_accs),
   117       model_(model), H_(H), auxf_impr_ptr_(auxf_impr), auxf_impr_(0.0) { }
   121       updater_(other.updater_), num_accs_(other.num_accs_),
   122       den_accs_(other.den_accs_), model_(other.model_),
   123       H_(other.H_), auxf_impr_ptr_(other.auxf_impr_ptr_), auxf_impr_(0.0) { }
   126     *auxf_impr_ptr_ += auxf_impr_;
   129   inline void operator() () {
   132     updater_->UpdatePhoneVectorsInternal(num_accs_, den_accs_, H_, model_,
   133                                          &auxf_impr_, num_threads_, thread_id_);
   140   const std::vector<SpMatrix<double> > &
H_;
   157   if (!accs.
a_.empty() && accs.
a_[j1](m, 0) != 0) { 
   163     double gamma_jmi = accs.
gamma_[j1](m, 
i);
   164     double quadratic_term = std::max(gamma_jmi, gamma_jm * w_jm(
i));
   165     double scalar = gamma_jmi - gamma_jm * w_jm(
i) + quadratic_term
   168     if (gamma_jmi != 0.0)
   169       H_jm->
AddSp(gamma_jmi, H[
i]);  
   170     if (quadratic_term > 1.0e-10)
   171       H_jm->
AddVec2(static_cast<BaseFloat>(quadratic_term), model.
w_.
Row(i));
   185     int32 thread_id)
 const {
   188       j1_start = block_size * thread_id,
   189       j1_end = std::min(num_accs.
num_groups_, j1_start + block_size);
   193   for (
int32 j1 = j1_start; j1 < j1_end; j1++) {
   194     double num_state_count = 0.0,
   195         state_auxf_impr = 0.0;
   198       double gamma_jm_num = num_accs.
gamma_[j1].Row(m).Sum();
   199       double gamma_jm_den = den_accs.
gamma_[j1].Row(m).Sum();
   200       num_state_count += gamma_jm_num;
   216                            &g_jm_num, &H_jm_num);
   218                            &g_jm_den, &H_jm_den);
   223       local_derivative.
AddVec(1.0, g_jm_num);
   224       local_derivative.
AddSpVec(-1.0, H_jm_num, v_jm, 1.0);
   225       local_derivative.
AddVec(-1.0, g_jm_den);
   226       local_derivative.
AddSpVec(-1.0 * -1.0, H_jm_den, v_jm, 1.0);
   229       quadratic_term.
AddSp(1.0, H_jm_den);
   230       double substate_count = 1.0e-10 + gamma_jm_num + gamma_jm_den;
   242           ((gamma_jm_num + gamma_jm_den == 0) ? 0.0 :
   247       v_jm.AddVec(1.0, delta_v_jm);
   248       model->
v_[j1].Row(m).CopyFromVec(v_jm);
   249       state_auxf_impr += auxf_impr;
   252     *auxf_impr += state_auxf_impr;
   253     if (j1 < 10 && thread_id == 0) {
   254       KALDI_LOG << 
"Objf impr for group j = " << j1 << 
"  is "   255                 << (state_auxf_impr / (num_state_count + 1.0e-10))
   256                 << 
" over " << num_state_count << 
" frames";
   267   double count = 0.0, auxf_impr = 0.0;
   270   for (
int32 j1 = 0; j1 < J1; j1++) count += num_accs.
gamma_[j1].Sum();
   277   KALDI_LOG << 
"**Overall auxf improvement for v is " << auxf_impr
   278             << 
" over " << count << 
" frames";
   297     double gamma_i_num = gamma_num(
i), gamma_i_den = gamma_den(
i);
   299     if (gamma_i_num + gamma_i_den == 0.0) {
   300       KALDI_WARN << 
"Not updating phonetic basis for i = " << 
i   301                  << 
" because count is zero. ";
   320     Q.
AddSp(1.0, Q_num[i]);
   321     Q.
AddSp(1.0, Q_den[i]);
   323     double state_count = 1.0e-10 + gamma_i_num + gamma_i_den; 
   342     model->
M_[
i].CopyFromMat(Mi);
   343     if (i < 10 || impr / state_count > 3.0) {
   344       KALDI_VLOG(2) << 
"Objf impr for projection M for i = " << i << 
", is "   345                     << (impr/(gamma_i_num + 1.0e-20)) << 
" over " << gamma_i_num
   351   tot_impr /= (tot_count + 1.0e-20);
   352   KALDI_LOG << 
"Overall auxiliary function improvement for model projections "   353             << 
"M is " << tot_impr << 
" over " << tot_count << 
" frames";
   355   KALDI_VLOG(1) << 
"Updating M: num-count is " << gamma_num;
   356   KALDI_VLOG(1) << 
"Updating M: den-count is " << gamma_den;
   357   KALDI_VLOG(1) << 
"Updating M: objf-impr is " << impr_vec;
   375   KALDI_LOG << 
"Updating weight projections";
   392     std::vector<Matrix<double> > log_a_num;
   396     UpdateWClass c_num(num_accs, *model, w, log_a_num, &F_i_num, &g_i_num, &garbage);
   400     std::vector<Matrix<double> > log_a_den;
   404     UpdateWClass c_den(den_accs, *model, w, log_a_den, &F_i_den, &g_i_den, &garbage);
   422     quadratic_term.CopyFromVec(F_i_num.Row(
i));
   424     quadratic_term.AddSp(1.0, tmp_F);
   426     double state_count = gamma_num(
i) + gamma_den(
i);
   428     quadratic_term.Scale((state_count + 
options_.
tau_w) / (state_count + 1.0e-10));
   441     impr_vec(
i) = objf_impr;
   442     if (
i < 10 || objf_impr / (gamma_num(
i) + 1.0e-10) > 2.0) {
   443       KALDI_LOG << 
"Predicted objf impr for w per frame is "   444                 << (objf_impr / (gamma_num(
i) + 1.0e-10))
   445                 << 
" over " << gamma_num(
i) << 
" frames.";
   447     model->
w_.
Row(
i).AddVec(1.0, delta_w);
   449   KALDI_VLOG(1) << 
"Updating w: numerator count is " << gamma_num;
   450   KALDI_VLOG(1) << 
"Updating w: denominator count is " << gamma_den;
   451   KALDI_VLOG(1) << 
"Updating w: objf-impr is " << impr_vec;
   453   double tot_num_count = gamma_num.
Sum(), tot_impr = impr_vec.
Sum();
   454   tot_impr /= tot_num_count;
   456   KALDI_LOG << 
"**Overall objf impr for w per frame is "   457             << tot_impr << 
" over " << tot_num_count
   469   double tot_impr = 0.0;
   471     if (gamma_num(
i) < 200.0) {
   472       KALDI_LOG << 
"Numerator count is small " << gamma_num(
i) << 
" for gaussian "   473                 << 
i << 
", not updating u_i.";
   485     double state_count = gamma_num(
i) + gamma_den(
i);
   495     double impr_per_frame = impr / gamma_num(
i);
   497       KALDI_WARN << 
"Updating speaker weight projections u, for Gaussian index "   498                  << 
i << 
", impr/frame is " << impr_per_frame << 
" over "   499                  << gamma_num(
i) << 
" frames, scaling back to not exceed "   503       delta_u.
Scale(scale);
   510       KALDI_LOG << 
"Objf impr for spk weight-projection u for i = " << (
i)
   511                 << 
", is " << (impr / (gamma_num(
i) + 1.0e-20)) << 
" over "   512                 << gamma_num(
i) << 
" frames";
   515     model->
u_.
Row(
i).CopyFromVec(u_i);
   518   KALDI_LOG << 
"**Overall objf impr for u is " << (tot_impr/gamma_num.
Sum())
   519             << 
", over " << gamma_num.
Sum() << 
" frames";
   530       num_accs.
Z_.size() == 0) {
   531     KALDI_ERR << 
"Speaker subspace dim is zero or no stats accumulated";
   540     double gamma_i_num = gamma_num(
i), gamma_i_den = gamma_den(
i);
   541     if (gamma_i_num + gamma_i_den == 0.0) {
   542       KALDI_WARN << 
"Not updating speaker basis for i = " << 
i   543                  << 
" because count is zero. ";
   560     double state_count = 1.0e-10 + gamma_i_num + gamma_i_den; 
   578     model->
N_[
i].CopyFromMat(Ni);
   579     if (
i < 10 || impr / (state_count+1.0e-20) > 3.0) {
   580       KALDI_LOG << 
"Objf impr for spk projection N for i = " << (
i)
   581                 << 
", is " << (impr / (gamma_i_num + 1.0e-20)) << 
" over "   582                 << gamma_i_num << 
" frames";
   586   KALDI_VLOG(1) << 
"Updating N: numerator count is " << gamma_num;
   587   KALDI_VLOG(1) << 
"Updating N: denominator count is " << gamma_den;
   588   KALDI_VLOG(1) << 
"Updating N: objf-impr is " << impr_vec;
   590   double tot_count = gamma_num.
Sum(), tot_impr = impr_vec.
Sum();
   591   tot_impr /= (tot_count + 1.0e-20);
   592   KALDI_LOG << 
"**Overall auxf impr for N is " << tot_impr
   593             << 
" over " << tot_count << 
" frames";
   613     double num_count = gamma_num(
i), den_count = gamma_den(
i);
   616     SigmaStats.
AddSp(1.0, num_accs.
S_[i]);
   617     SigmaStats.
AddSp(-1.0, den_accs.
S_[i]);
   622     double count = num_count - den_count;
   627     double E_den = 1.0 + inv_lrate, E_num = inv_lrate - 1.0;
   629     double smoothing_count =
   631         (E_den * den_count) +              
   632         (E_num * num_count) +
   634     SigmaStats.
AddSp(smoothing_count, SigmaOld);
   635     count += smoothing_count;
   636     SigmaStats.
Scale(1.0 / count);
   639     bool verbose = 
false;
   645     double auxf_change = -0.5 * count *(
TraceSpSp(SigmaInv, SigmaStats)
   648                                         + SigmaInvOld.LogDet());
   651     impr_vec(i) = auxf_change;
   652     if (i < 10 || auxf_change / (num_count+den_count+1.0e-10) > 2.0
   653         || n_floor+n_ceiling > 0) {
   654       KALDI_LOG << 
"Updating variance: Auxf change per frame for Gaussian "   655                 << i << 
" is " << (auxf_change / num_count) << 
" over "   656                 << num_count << 
" frames " << 
"(den count was " << den_count
   657                 << 
"), #floor,ceil was " << n_floor << 
", " << n_ceiling;
   660   KALDI_VLOG(1) << 
"Updating Sigma: numerator count is " << gamma_num;
   661   KALDI_VLOG(1) << 
"Updating Sigma: denominator count is " << gamma_den;
   662   KALDI_VLOG(1) << 
"Updating Sigma: objf-impr is " << impr_vec;
   664   double tot_count = gamma_num.Sum(), tot_impr = impr_vec.Sum();
   665   tot_impr /= tot_count+1.0e-20;
   666   KALDI_LOG << 
"**Overall auxf impr for Sigma is " << tot_impr
   667             << 
" over " << tot_count << 
" frames";
   676   KALDI_LOG << 
"Updating substate mixture weights";
   678   double tot_count = 0.0, tot_impr = 0.0;
   682         orig_weights(model->
c_[j2]), weights(model->
c_[j2]);
   684     for (
int32 m = 0; m < M; m++) {
   685       num_occs(m) = num_accs.
gamma_c_[j2](m)
   687       den_occs(m) = den_accs.
gamma_c_[j2](m);
   690     if (weights.
Dim() > 1) {
   691       double begin_auxf = 0.0, end_auxf = 0.0;
   692       for (
int32 m = 0; m < M; m++) {  
   693         begin_auxf += num_occs(m) * log (weights(m))
   694             - den_occs(m) * weights(m) / orig_weights(m);
   696       for (
int32 iter = 0; iter < 50; iter++) {
   699         for (
int32 m = 0; m < M; m++)
   700           max_m = std::max(max_m, den_occs(m)/orig_weights(m));
   701         for (
int32 m = 0; m < M; m++)
   702           k_jm(m) = max_m - den_occs(m)/orig_weights(m);
   703         for (
int32 m = 0; m < M; m++)
   704           weights(m) = num_occs(m) + k_jm(m)*weights(m);
   707       for (
int32 m = 0; m < M; m++)
   708         weights(m) = std::max(weights(m),
   712       for (
int32 m = 0; m < M; m++) {
   713         end_auxf += num_occs(m) * log (weights(m))
   714             - den_occs(m) * weights(m) / orig_weights(m);
   716       tot_impr += end_auxf - begin_auxf;
   717       double this_impr = ((end_auxf - begin_auxf) / num_occs.Sum());
   718       if (j2 < 10 || this_impr > 0.5) {
   719         KALDI_LOG << 
"Updating substate weights: auxf impr for pdf " << j2
   720                   << 
" is " << this_impr << 
" per frame over " << num_occs.Sum()
   721                   << 
" frames (den count is " << den_occs.Sum() << 
")";
   724     model->
c_[j2].CopyFromVec(weights);
   725     tot_count += den_occs.Sum(); 
   729   tot_impr /= (tot_count + 1.0e-20);
   731   KALDI_LOG << 
"**Overall auxf impr for c is " << tot_impr
   732             << 
" over " << tot_count << 
" frames";
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
 
Matrix< double > t_
[SSGMM] each row is one of the t_i quantities in the less-exact version of the SSGMM update for the s...
 
std::vector< Vector< double > > gamma_c_
Sub-state occupancies gamma_{jm}^{(c)} for each sub-state. 
 
void CopyFromVec(const SubVector< OtherReal > &orig)
CopyFromVec just interprets the vector as having the same layout as the packed matrix. 
 
Matrix< BaseFloat > u_
[SSGMM] Speaker-subspace weight projection vectors. Dimension is [I][T] 
 
double UpdateN(const MleAmSgmm2Accs &num_accs, const MleAmSgmm2Accs &den_accs, const Vector< double > &gamma_num, const Vector< double > &gamma_den, AmSgmm2 *model) const
 
Class for definition of the subspace Gmm acoustic model. 
 
BaseFloat tau_Sigma
Tau value for smoothing covariance-matrices Sigma. 
 
BaseFloat max_cond
is allowed to change. 
 
static void ComputeQ(const MleAmSgmm2Accs &accs, const AmSgmm2 &model, std::vector< SpMatrix< double > > *Q)
Compute the Q_i quantities (Eq. 64). 
 
This class describes the options for maximizing various quadratic objective functions. 
 
double UpdateU(const MleAmSgmm2Accs &num_accs, const MleAmSgmm2Accs &den_accs, const Vector< double > &gamma_num, const Vector< double > &gamma_den, AmSgmm2 *model)
 
double UpdateVars(const MleAmSgmm2Accs &num_accs, const MleAmSgmm2Accs &den_accs, const Vector< double > &gamma_num, const Vector< double > &gamma_den, const std::vector< SpMatrix< double > > &S_means, AmSgmm2 *model) const
 
double SolveQuadraticProblem(const SpMatrix< double > &H, const VectorBase< double > &g, const SolverOptions &opts, VectorBase< double > *x)
 
void AddRowSumMat(Real alpha, const MatrixBase< Real > &M, Real beta=1.0)
Does *this = alpha * (sum of rows of M) + beta * *this. 
 
BaseFloat max_impr_u
Maximum improvement/frame allowed for u [0.25, carried over from ML update.]. 
 
std::vector< Vector< BaseFloat > > c_
c_{jm}, mixture weights. Dimension is [J2][#mix] 
 
BaseFloat tau_u
Tau value for smoothing update of speaker-subspace weight projectsions (u) 
 
Real SolveQuadraticMatrixProblem(const SpMatrix< Real > &Q, const MatrixBase< Real > &Y, const SpMatrix< Real > &SigmaInv, const SolverOptions &opts, MatrixBase< Real > *M)
Maximizes the auxiliary function :  Like a numerically stable version of . 
 
Matrix< BaseFloat > w_
Phonetic-subspace weight projection vectors. Dimension is [I][S]. 
 
BaseFloat lrate_Sigma
Learning rate used in updating Sigma– default 0.5. 
 
BaseFloat lrate_v
Learning rate used in updating v– default 0.5. 
 
BaseFloat lrate_w
Learning rate used in updating w– default 1.0. 
 
const MleAmSgmm2Accs & den_accs_
 
BaseFloat lrate_N
Learning rate used in updating N– default 0.5. 
 
BaseFloat tau_v
Smoothing constant for updates of sub-state vectors v_{jm}. 
 
void AddMat(const Real alpha, const MatrixBase< Real > &M, MatrixTransposeType transA=kNoTrans)
*this += alpha * M [or M^T] 
 
std::vector< Matrix< BaseFloat > > N_
Speaker-subspace projections. Dimension is [I][D][T]. 
 
static void ComputeSMeans(const MleAmSgmm2Accs &accs, const AmSgmm2 &model, std::vector< SpMatrix< double > > *S_means)
Compute the S_means quantities, minus sum: (Y_i M_i^T + M_i Y_I^T). 
 
BaseFloat lrate_u
Learning rate used in updating u– default 1.0. 
 
std::vector< SpMatrix< double > > S_
S_{i}^{-}, scatter of adapted feature vectors x_{i}(t). Dim is [I][D][D]. 
 
std::vector< Matrix< double > > gamma_
Gaussian occupancies gamma_{jmi} for each substate and Gaussian index, pooled over groups...
 
void AddSpVec(const Real alpha, const SpMatrix< Real > &M, const VectorBase< Real > &v, const Real beta)
Add symmetric positive definite matrix times vector: this <– beta*this + alpha*M*v. 
 
Real ApplySoftMax()
Apply soft-max to vector and return normalizer (log sum of exponentials). 
 
BaseFloat tau_M
Smoothing constant for the M quantities (phone-subspace projections) 
 
int32 PhoneSpaceDim() const
 
std::vector< Matrix< BaseFloat > > v_
The parameters in a particular SGMM state. 
 
const EbwAmSgmm2Updater * updater_
 
int32 num_groups_
Other model specifications. 
 
std::vector< SpMatrix< double > > U_
the U_i quantities from the less-exact version of the SSGMM update for the speaker weight projections...
 
std::vector< Matrix< BaseFloat > > M_
Phonetic-subspace projections. Dimension is [I][D][S]. 
 
int ApplyFloor(const SpMatrix< Real > &Floor, Real alpha=1.0, bool verbose=false)
Floors this symmetric matrix to the matrix alpha * Floor, where the matrix Floor is positive definite...
 
void CopyFromVec(const VectorBase< Real > &v)
Copy data from another vector (must match own size). 
 
void AddVec2(const Real alpha, const VectorBase< OtherReal > &v)
rank-one update, this <– this + alpha v v' 
 
BaseFloat lrate_M
Learning rate used in updating M– default 0.5. 
 
int32 NumSubstatesForPdf(int32 j2) const
 
t .. not really part of SGMM. 
 
std::vector< Matrix< double > > Y_
The stats which are not tied to any state. 
 
uint16 SgmmUpdateFlagsType
Bitwise OR of the above flags. 
 
const SubVector< Real > Row(MatrixIndexT i) const
Return specific row of matrix [const]. 
 
std::vector< SpMatrix< BaseFloat > > SigmaInv_
Globally shared parameters of the subspace GMM. 
 
std::vector< Matrix< double > > y_
The SGMM state specific stats. 
 
void MulElements(const VectorBase< Real > &v)
Multiply element-by-element by another vector. 
 
void AddSp(const Real alpha, const SpMatrix< Real > &Ma)
 
The letters correspond to the variable names. 
 
const MleAmSgmm2Accs & num_accs_
 
void RunMultiThreaded(const C &c_in)
Here, class C should inherit from MultiThreadable. 
 
BaseFloat tau_c
Tau value for smoothing substate weights (c) 
 
void AddMatSp(const Real alpha, const MatrixBase< Real > &A, MatrixTransposeType transA, const SpMatrix< Real > &B, const Real beta)
this <– beta*this + alpha*A*B. 
 
BaseFloat tau_N
Smoothing constant for the N quantities (speaker-subspace projections) 
 
void ComputeH(std::vector< SpMatrix< Real > > *H_i) const
Computes quantities H = M_i Sigma_i^{-1} M_i^T. 
 
double TraceSpSp(const SpMatrix< double > &A, const SpMatrix< double > &B)
 
BaseFloat cov_min_value
E.g. 
 
MatrixIndexT Dim() const
Returns the dimension of the vector. 
 
EbwAmSgmm2Options options_
 
void Scale(Real alpha)
Multiplies all elements by this constant. 
 
void UpdatePhoneVectorsInternal(const MleAmSgmm2Accs &num_accs, const MleAmSgmm2Accs &den_accs, const std::vector< SpMatrix< double > > &H, AmSgmm2 *model, double *auxf_impr, int32 num_threads, int32 thread_id) const
 
double UpdateSubstateWeights(const MleAmSgmm2Accs &num_accs, const MleAmSgmm2Accs &den_accs, AmSgmm2 *model)
 
void AddMatVec(const Real alpha, const MatrixBase< Real > &M, const MatrixTransposeType trans, const VectorBase< Real > &v, const Real beta)
Add matrix times vector : this <– beta*this + alpha*M*v. 
 
Real Sum() const
Returns sum of the elements. 
 
std::vector< Matrix< double > > a_
[SSGMM] These a_{jmi} quantities are dimensionally the same as the gamma quantities. 
 
EbwUpdatePhoneVectorsClass(const EbwUpdatePhoneVectorsClass &other)
 
BaseFloat tau_w
Tau value for smoothing update of phonetic-subspace weight projectsions (w) 
 
double UpdateW(const MleAmSgmm2Accs &num_accs, const MleAmSgmm2Accs &den_accs, const Vector< double > &gamma_num, const Vector< double > &gamma_den, AmSgmm2 *model)
Note: in the discriminative case we do just one iteration of updating the w quantities. 
 
std::vector< SpMatrix< double > > R_
R_{i}, quadratic term for speaker subspace estimation. Dim is [I][T][T]. 
 
#define KALDI_ASSERT(cond)
 
double UpdatePhoneVectors(const MleAmSgmm2Accs &num_accs, const MleAmSgmm2Accs &den_accs, const std::vector< SpMatrix< double > > &H, AmSgmm2 *model) const
 
int32 feature_dim_
Dimensionality of various subspaces. 
 
void ComputeNormalizers()
Computes the data-independent terms in the log-likelihood computation for each Gaussian component and...
 
std::vector< Matrix< double > > Z_
Stats Z_{i} for speaker-subspace projections N. Dim is [I][D][T]. 
 
void Update(const MleAmSgmm2Accs &num_accs, const MleAmSgmm2Accs &den_accs, AmSgmm2 *model, SgmmUpdateFlagsType flags, BaseFloat *auxf_change_out, BaseFloat *count_out)
 
BaseFloat epsilon
very small value used in SolveQuadraticProblem; workaround 
 
BaseFloat min_substate_weight
Minimum allowed weight in a sub-state. 
 
bool HasSpeakerDependentWeights() const
True if doing SSGMM. 
 
Class for the accumulators associated with the phonetic-subspace model parameters. 
 
void Invert(Real *logdet=NULL, Real *det_sign=NULL, bool inverse_needed=true)
matrix inverse. 
 
Real VecVec(const VectorBase< Real > &a, const VectorBase< Real > &b)
Returns dot product between v1 and v2. 
 
void AddVec(const Real alpha, const VectorBase< OtherReal > &v)
Add vector : *this = *this + alpha * rv (with casting between floats and doubles) ...
 
EbwUpdatePhoneVectorsClass(const EbwAmSgmm2Updater *updater, const MleAmSgmm2Accs &num_accs, const MleAmSgmm2Accs &den_accs, const std::vector< SpMatrix< double > > &H, AmSgmm2 *model, double *auxf_impr)
 
static void ComputePhoneVecStats(const MleAmSgmm2Accs &accs, const AmSgmm2 &model, const std::vector< SpMatrix< double > > &H, int32 j1, int32 m, const Vector< double > &w_jm, double gamma_jm, Vector< double > *g_jm, SpMatrix< double > *H_jm)
 
double UpdateM(const MleAmSgmm2Accs &num_accs, const MleAmSgmm2Accs &den_accs, const std::vector< SpMatrix< double > > &Q_num, const std::vector< SpMatrix< double > > &Q_den, const Vector< double > &gamma_num, const Vector< double > &gamma_den, AmSgmm2 *model) const
 
int32 NumSubstatesForGroup(int32 j1) const
 
Real LogDet(Real *det_sign=NULL) const
 
~EbwUpdatePhoneVectorsClass()
 
const std::vector< SpMatrix< double > > & H_
 
static void ComputeLogA(const MleAmSgmm2Accs &accs, std::vector< Matrix< double > > *log_a)