All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
HldaAccsDiagGmm Class Reference

This class stores the compact form of the HLDA statistics, given a diagonal GMM. More...

#include <hlda.h>

Collaboration diagram for HldaAccsDiagGmm:

Public Member Functions

 HldaAccsDiagGmm ()
 
 HldaAccsDiagGmm (const AmDiagGmm &model, int32 orig_feat_dim, BaseFloat speedup=1.0)
 Constructor; calls Init(). More...
 
int32 ModelDim ()
 
int32 FeatureDim ()
 
void Init (const AmDiagGmm &model, int32 orig_feat_dim, BaseFloat speedup=1.0)
 Initializes the model. More...
 
void Read (std::istream &is, bool binary, bool add=false)
 
void Write (std::ostream &os, bool binary) const
 
void Update (AmDiagGmm *model, MatrixBase< BaseFloat > *Mfull, MatrixBase< BaseFloat > *M, BaseFloat *objf_impr_out, BaseFloat *count_out) const
 The Update function does the ML update. More...
 
void AccumulateFromPosteriors (int32 pdf_id, const DiagGmm &gmm, const VectorBase< BaseFloat > &data, const VectorBase< BaseFloat > &posteriors)
 Accumulates stats (you have to first work out the posteriors yourself). More...
 

Private Attributes

std::vector< SpMatrix< double > > S_
 
std::vector< Vector< double > > occs_
 
std::vector< Matrix< double > > mean_accs_
 
BaseFloat speedup_
 
std::vector< Vector< double > > occs_sub_
 
std::vector< Matrix< double > > mean_accs_sub_
 
BaseFloat sample_gconst_
 

Detailed Description

This class stores the compact form of the HLDA statistics, given a diagonal GMM.

That it, it stores full-dimensional means for all the model's means, and a set of global matrices for the full variance. C.f. Heteroscedastic Linear Discriminant Analysis (HLDA)

Definition at line 38 of file hlda.h.

Constructor & Destructor Documentation

HldaAccsDiagGmm ( )
inline

Definition at line 40 of file hlda.h.

40 { }
HldaAccsDiagGmm ( const AmDiagGmm model,
int32  orig_feat_dim,
BaseFloat  speedup = 1.0 
)
inline

Constructor; calls Init().

Definition at line 43 of file hlda.h.

References HldaAccsDiagGmm::Init().

45  {
46  Init(model, orig_feat_dim, speedup);
47  }
void Init(const AmDiagGmm &model, int32 orig_feat_dim, BaseFloat speedup=1.0)
Initializes the model.
Definition: hlda.cc:102

Member Function Documentation

void AccumulateFromPosteriors ( int32  pdf_id,
const DiagGmm gmm,
const VectorBase< BaseFloat > &  data,
const VectorBase< BaseFloat > &  posteriors 
)

Accumulates stats (you have to first work out the posteriors yourself).

Definition at line 138 of file hlda.cc.

References VectorBase< Real >::AddVec(), VectorBase< Real >::Dim(), rnnlm::i, DiagGmm::inv_vars(), KALDI_ASSERT, HldaAccsDiagGmm::mean_accs_, HldaAccsDiagGmm::mean_accs_sub_, HldaAccsDiagGmm::occs_, HldaAccsDiagGmm::occs_sub_, kaldi::RandUniform(), HldaAccsDiagGmm::S_, and HldaAccsDiagGmm::speedup_.

141  {
142  Vector<double> data_dbl(data);
143  KALDI_ASSERT(static_cast<size_t>(pdf_id) < occs_.size()
144  && occs_[pdf_id].Dim() == posteriors.Dim());
145  KALDI_ASSERT(mean_accs_[pdf_id].NumCols() == data.Dim()
146  && "Feature dim mismatch in HLDA computation ");
147  double tot_occ = 0.0;
148  int32 model_dim = S_.size() - 1;
149  Vector<BaseFloat> tot_occ_times_inv_var(model_dim);
150 
151  if (speedup_ == 1.0) { // no speedup; only one type of acc.
152  for (int32 i = 0; i < posteriors.Dim(); i++) {
153  if (posteriors(i) > 1.0e-05) {
154  BaseFloat occ = posteriors(i);
155  tot_occ += occ;
156  occs_[pdf_id](i) += occ;
157  mean_accs_[pdf_id].Row(i).AddVec(occ, data_dbl);
158 
159  SubVector<BaseFloat> inv_var(gmm.inv_vars(), i); // this inv-var.
160  tot_occ_times_inv_var.AddVec(occ, inv_var);
161  }
162  }
163  } else {
164  // Using a data subset.
165  // In any case, accumulate regular occs and means.
166  Vector<double> posteriors_dbl(posteriors);
167  occs_[pdf_id].AddVec(1.0, posteriors_dbl);
168  mean_accs_[pdf_id].AddVecVec(1.0, posteriors_dbl, data_dbl);
169  if (RandUniform() > speedup_) return; // continue with probability "speedup".
170 
171  for (int32 i = 0; i < posteriors.Dim(); i++) {
172  if (posteriors(i) > 1.0e-05) {
173  BaseFloat occ = posteriors(i);
174  tot_occ += occ;
175  occs_sub_[pdf_id](i) += occ;
176  mean_accs_sub_[pdf_id].Row(i).AddVec(occ, data_dbl);
177 
178  SubVector<BaseFloat> inv_var(gmm.inv_vars(), i); // this inv-var.
179  tot_occ_times_inv_var.AddVec(occ, inv_var);
180  }
181  }
182 
183  }
184  if (tot_occ != 0.0) {
185  for (int32 i = 0; i < model_dim; i++)
186  S_[i].AddVec2(tot_occ_times_inv_var(i), data_dbl);
187  S_[model_dim].AddVec2(tot_occ, data_dbl);
188  }
189 }
float RandUniform(struct RandomState *state=NULL)
Returns a random number strictly between 0 and 1.
Definition: kaldi-math.h:151
std::vector< SpMatrix< double > > S_
Definition: hlda.h:95
std::vector< Matrix< double > > mean_accs_
Definition: hlda.h:98
float BaseFloat
Definition: kaldi-types.h:29
std::vector< Vector< double > > occs_
Definition: hlda.h:97
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:169
std::vector< Matrix< double > > mean_accs_sub_
Definition: hlda.h:104
BaseFloat speedup_
Definition: hlda.h:102
std::vector< Vector< double > > occs_sub_
Definition: hlda.h:103
MatrixIndexT Dim() const
Returns the dimension of the vector.
Definition: kaldi-vector.h:62
int32 FeatureDim ( )
inline

Definition at line 51 of file hlda.h.

References HldaAccsDiagGmm::S_.

Referenced by main().

51 { return (S_.empty() ? 0 : S_[0].NumRows()); }
std::vector< SpMatrix< double > > S_
Definition: hlda.h:95
void Init ( const AmDiagGmm model,
int32  orig_feat_dim,
BaseFloat  speedup = 1.0 
)

Initializes the model.

Requires orig_feat_dim >= model.Dim() If speedup < 1.0, it will run a faster form of training in which it only accumulates the full stats from a subset of the data whose size is proportional to speedup (1.0 effectively uses all the data).

Definition at line 102 of file hlda.cc.

References AmDiagGmm::Dim(), DiagGmm::gconsts(), AmDiagGmm::GetPdf(), rnnlm::i, KALDI_ASSERT, HldaAccsDiagGmm::mean_accs_, HldaAccsDiagGmm::mean_accs_sub_, AmDiagGmm::NumGaussInPdf(), AmDiagGmm::NumPdfs(), HldaAccsDiagGmm::occs_, HldaAccsDiagGmm::occs_sub_, HldaAccsDiagGmm::S_, HldaAccsDiagGmm::sample_gconst_, and HldaAccsDiagGmm::speedup_.

Referenced by HldaAccsDiagGmm::HldaAccsDiagGmm().

104  {
105  KALDI_ASSERT(am.Dim() != 0);
106  int32 num_pdfs = am.NumPdfs(), model_dim = am.Dim();
107  KALDI_ASSERT(orig_feat_dim > 0 && orig_feat_dim >= model_dim);
108 
109  S_.resize(model_dim+1);
110  for (int32 i = 0; i <= model_dim; i++)
111  S_[i].Resize(orig_feat_dim);
112  occs_.resize(num_pdfs);
113  mean_accs_.resize(num_pdfs);
114  for (int32 i = 0; i < num_pdfs; i++) {
115  occs_[i].Resize(am.NumGaussInPdf(i));
116  mean_accs_[i].Resize(am.NumGaussInPdf(i), orig_feat_dim);
117  }
118  speedup_ = speedup;
119  if (speedup_ == 1.0) {
120  occs_sub_.resize(0);
121  mean_accs_sub_.resize(0);
122  } else {
123  occs_sub_.resize(num_pdfs);
124  mean_accs_sub_.resize(num_pdfs);
125  for (int32 i = 0; i < num_pdfs; i++) {
126  occs_sub_[i].Resize(am.NumGaussInPdf(i));
127  mean_accs_sub_[i].Resize(am.NumGaussInPdf(i), orig_feat_dim);
128  }
129  }
130 
131  sample_gconst_ = am.GetPdf(0).gconsts()(0);
132 
133 }
BaseFloat sample_gconst_
Definition: hlda.h:105
std::vector< SpMatrix< double > > S_
Definition: hlda.h:95
std::vector< Matrix< double > > mean_accs_
Definition: hlda.h:98
std::vector< Vector< double > > occs_
Definition: hlda.h:97
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:169
std::vector< Matrix< double > > mean_accs_sub_
Definition: hlda.h:104
BaseFloat speedup_
Definition: hlda.h:102
std::vector< Vector< double > > occs_sub_
Definition: hlda.h:103
int32 ModelDim ( )
inline

Definition at line 49 of file hlda.h.

References HldaAccsDiagGmm::S_.

Referenced by main().

49 { return (S_.empty() ? 0 : S_.size()-1); }
std::vector< SpMatrix< double > > S_
Definition: hlda.h:95
void Read ( std::istream &  is,
bool  binary,
bool  add = false 
)

Definition at line 28 of file hlda.cc.

References kaldi::ExpectToken(), rnnlm::i, KALDI_ERR, HldaAccsDiagGmm::mean_accs_, HldaAccsDiagGmm::mean_accs_sub_, HldaAccsDiagGmm::occs_, HldaAccsDiagGmm::occs_sub_, HldaAccsDiagGmm::Read(), kaldi::ReadBasicType(), HldaAccsDiagGmm::S_, HldaAccsDiagGmm::sample_gconst_, and HldaAccsDiagGmm::speedup_.

Referenced by main(), and HldaAccsDiagGmm::Read().

28  {
29  ExpectToken(is, binary, "<HldaAccsDiagGmm>");
30  ExpectToken(is, binary, "<S>");
31  int32 dim; // just the #elems of S_, equals model-dim+1.
32  ReadBasicType(is, binary, &dim);
33  if (add && S_.size() != 0 && static_cast<size_t>(dim) != S_.size())
34  KALDI_ERR << "HldaAccsDiagGmm::Read, summing accs of different size.";
35  if (!add || S_.empty()) S_.resize(dim);
36  for (size_t i = 0; i < S_.size(); i++)
37  S_[i].Read(is, binary, add);
38  ExpectToken(is, binary, "<occs>");
39  int32 npdfs;
40  ReadBasicType(is, binary, &npdfs);
41  if (add && occs_.size() != 0 && static_cast<size_t>(npdfs) != occs_.size())
42  KALDI_ERR << "HldaAccsDiagGmm::Read, summing accs of different size.";
43  if (!add || occs_.empty()) {
44  occs_.resize(npdfs);
45  mean_accs_.resize(npdfs);
46  }
47  for (size_t i = 0; i < occs_.size(); i++)
48  occs_[i].Read(is, binary, add);
49  ExpectToken(is, binary, "<mean_accs>");
50  for (size_t i = 0; i < mean_accs_.size(); i++)
51  mean_accs_[i].Read(is, binary, add);
52  ExpectToken(is, binary, "<speedup>");
53  ReadBasicType(is, binary, &speedup_);
54  if (speedup_ != 1.0) {
55  if (!add || occs_sub_.empty()) {
56  occs_sub_.resize(npdfs);
57  mean_accs_sub_.resize(npdfs);
58  }
59  ExpectToken(is, binary, "<occs_sub>");
60  for (size_t i = 0; i < occs_sub_.size(); i++)
61  occs_sub_[i].Read(is, binary, add);
62  ExpectToken(is, binary, "<mean_accs_sub>");
63  for (size_t i = 0; i < mean_accs_sub_.size(); i++)
64  mean_accs_sub_[i].Read(is, binary, add);
65  }
66 
67  ExpectToken(is, binary, "<sample_gconst>");
68  ReadBasicType(is, binary, &sample_gconst_);
69  ExpectToken(is, binary, "</HldaAccsDiagGmm>");
70 }
BaseFloat sample_gconst_
Definition: hlda.h:105
void ReadBasicType(std::istream &is, bool binary, T *t)
ReadBasicType is the name of the read function for bool, integer types, and floating-point types...
Definition: io-funcs-inl.h:55
std::vector< SpMatrix< double > > S_
Definition: hlda.h:95
std::vector< Matrix< double > > mean_accs_
Definition: hlda.h:98
void ExpectToken(std::istream &is, bool binary, const char *token)
ExpectToken tries to read in the given token, and throws an exception on failure. ...
Definition: io-funcs.cc:188
#define KALDI_ERR
Definition: kaldi-error.h:127
std::vector< Vector< double > > occs_
Definition: hlda.h:97
void Read(std::istream &is, bool binary, bool add=false)
Definition: hlda.cc:28
std::vector< Matrix< double > > mean_accs_sub_
Definition: hlda.h:104
BaseFloat speedup_
Definition: hlda.h:102
std::vector< Vector< double > > occs_sub_
Definition: hlda.h:103
void Update ( AmDiagGmm model,
MatrixBase< BaseFloat > *  Mfull,
MatrixBase< BaseFloat > *  M,
BaseFloat objf_impr_out,
BaseFloat count_out 
) const

The Update function does the ML update.

It outputs the appropriate transform and sets the model's means (in this approach, the model's variances are unchanged and you would have to run more passes of model re-estimation, and HLDA accumulation and update, if you want the model's variances to be trained.

Parameters
model[in, out] The model, which must be the same model used to accumulate stats, or the update will be wrong. This function will set the model's means.
Mfull[in, out] Will be interpreted at input as the original full transform, of dimension orig-dim x orig-dim (e.g. from LDA), or previous iteration of HLDA. Will be set at output to
M[out] The output transform (only accepted rows), should be of dimension (feature-dim x orig-dim)
objf_impr_out[out] The objective function improvement
count_out[out] The data-count

Definition at line 192 of file hlda.cc.

References VectorBase< Real >::AddMatVec(), VectorBase< Real >::AddVec(), VectorBase< Real >::AddVec2(), kaldi::ApproxEqual(), DiagGmm::ComputeGconsts(), MatrixBase< Real >::CopyFromMat(), rnnlm::d, AmDiagGmm::Dim(), DiagGmm::gconsts(), AmDiagGmm::GetPdf(), rnnlm::i, DiagGmm::inv_vars(), KALDI_ASSERT, KALDI_ERR, KALDI_LOG, KALDI_WARN, kaldi::kNoTrans, HldaAccsDiagGmm::mean_accs_, HldaAccsDiagGmm::mean_accs_sub_, MatrixBase< Real >::NumCols(), DiagGmm::NumGauss(), MatrixBase< Real >::NumRows(), HldaAccsDiagGmm::occs_, HldaAccsDiagGmm::occs_sub_, HldaAccsDiagGmm::S_, HldaAccsDiagGmm::sample_gconst_, VectorBase< Real >::Scale(), AmDiagGmm::SetGaussianMean(), HldaAccsDiagGmm::speedup_, and MlltAccs::Update().

Referenced by main().

196  {
197  KALDI_ASSERT(am != NULL && Mfull != NULL);
198  KALDI_ASSERT(!S_.empty());
199 
200  if (!ApproxEqual(sample_gconst_, am->GetPdf(0).gconsts()(0), 1.0e-05)) {
201  KALDI_ERR << "You have to call the HLDA update with the same model as used "
202  "for accumulation.";
203  }
204 
205  int32 model_dim = S_.size() - 1;
206  KALDI_ASSERT(model_dim == am->Dim());
207 
208  int32 feat_dim = S_[0].NumRows();
209  KALDI_ASSERT(feat_dim >= model_dim);
210 
211  KALDI_ASSERT(Mfull->NumRows() == feat_dim && Mfull->NumCols() == feat_dim);
212  // this local G will be like the MLLT stats in a dimension equal
213  // to feat_dim.
214  std::vector<SpMatrix<double> > G(feat_dim);
215 
216  // This loop sets G to the outer product of the data, scaled
217  // by inverse var. Later we subtract the mean outer-product.
218  for (int32 i = 0; i < feat_dim; i++) {
219  G[i].Resize(feat_dim);
220  if (i < model_dim) {
221  G[i].CopyFromSp(S_[i]);
222  } else {
223  G[i].CopyFromSp(S_[model_dim]); // unit variance in all the
224  // rest of the dims, so we use the same stats.
225  }
226  }
227 
228  const std::vector<Vector<double> > &occs = (speedup_ == 1.0 ? occs_ : occs_sub_);
229  const std::vector<Matrix<double> > &mean_accs = (speedup_ == 1.0 ? mean_accs_ :
231 
232  int32 num_pdfs = occs.size();
233  Vector<double> tot_mean_acc(feat_dim);
234  double tot_occ = 0.0; // will be occ of subset of data, if speedup_ != 1.0
235  for (int32 p = 0; p < num_pdfs; p++) {
236  int32 num_gauss = occs[p].Dim();
237  const DiagGmm &gmm = am->GetPdf(p);
238  KALDI_ASSERT(num_gauss == gmm.NumGauss());
239  for (int32 g = 0; g < num_gauss; g++) {
240  double occ = occs[p](g), inv_occ = (occ == 0.0 ? 0.0 : 1.0/occ);
241  Vector<double> mean(feat_dim);
242  mean.AddVec(inv_occ, mean_accs[p].Row(g));
243  tot_mean_acc.AddVec(1.0, mean_accs[p].Row(g));
244  tot_occ += occ;
245  // update G matrices (subtracting outer-product of means, scaled by
246  // occ and inverse-var); has same effect as if G is summed outer product of
247  // (x-mu)^2, scaled by occ and inverse-var.
248 
249  SubVector<BaseFloat> inv_var(gmm.inv_vars(), g); // this inv-var.
250  for (int32 d = 0; d < model_dim; d++) {
251  G[d].AddVec2(-1.0*occ*inv_var(d), mean);
252  }
253  }
254  }
255  KALDI_ASSERT(tot_occ > 0.0);
256  Vector<double> tot_mean(tot_mean_acc);
257  tot_mean.Scale(1.0 / tot_occ);
258  // subtract total occ times outer product of global mean, from
259  // dimensions of G that correspond to "rejected dimensions"
260  // (with unit-var, global mean).
261  for (int32 d = model_dim; d < feat_dim; d++)
262  G[d].AddVec2(-tot_occ, tot_mean);
263 
264  for (int32 d = 0; d < feat_dim; d++)
265  KALDI_ASSERT(G[d].IsPosDef());
266 
267  MlltAccs::Update(tot_occ, G, Mfull, objf_impr_out, count_out);
268 
269  SubMatrix<BaseFloat> Mpart(*Mfull, 0, model_dim, 0, feat_dim);
270  if (M_out) {
271  KALDI_ASSERT(M_out->NumRows() == model_dim && M_out->NumCols() == feat_dim);
272  M_out->CopyFromMat(Mpart);
273  }
274  Matrix<double> Mpart_dbl(Mpart);
275 
276  // Now have to update the model.
277  int32 num_no_data = 0;
278  Vector<double> mean(model_dim);
279  double tot_occ_means = 0;
280  for (int32 p = 0; p < num_pdfs; p++) {
281  int32 num_gauss = static_cast<int32>(occs_[p].Dim());
282  for (int32 g = 0; g < num_gauss; g++) {
283  double occ = occs_[p](g);
284  tot_occ_means += occ;
285  if (occ == 0.0) num_no_data++; // and don't update Gaussian.
286  else {
287  SubVector<double> mean_stats(mean_accs_[p], g);
288  // project mean with transform, to accepted dim.
289  mean.AddMatVec(1.0 / occ, Mpart_dbl, kNoTrans, mean_stats, 0.0);
290  Vector<BaseFloat> mean_flt(mean);
291  am->SetGaussianMean(p, g, mean_flt);
292  }
293  }
294  am->GetPdf(p).ComputeGconsts();
295  }
296  KALDI_LOG << "Occupancy count used to update means was "
297  << tot_occ_means;
298  if (num_no_data > 0) {
299  KALDI_WARN << num_no_data << " Gaussians not updated due to no data; "
300  "be careful not to set your silence-weight to exactly zero (e.g. use 0.01).";
301  }
302 }
BaseFloat sample_gconst_
Definition: hlda.h:105
void Update(MatrixBase< BaseFloat > *M, BaseFloat *objf_impr_out, BaseFloat *count_out) const
The Update function does the ML update; it requires that M has the right size.
Definition: mllt.h:69
std::vector< SpMatrix< double > > S_
Definition: hlda.h:95
std::vector< Matrix< double > > mean_accs_
Definition: hlda.h:98
#define KALDI_ERR
Definition: kaldi-error.h:127
#define KALDI_WARN
Definition: kaldi-error.h:130
MatrixIndexT NumRows() const
Returns number of rows (or zero for emtpy matrix).
Definition: kaldi-matrix.h:58
MatrixIndexT NumCols() const
Returns number of columns (or zero for emtpy matrix).
Definition: kaldi-matrix.h:61
std::vector< Vector< double > > occs_
Definition: hlda.h:97
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:169
std::vector< Matrix< double > > mean_accs_sub_
Definition: hlda.h:104
#define KALDI_LOG
Definition: kaldi-error.h:133
BaseFloat speedup_
Definition: hlda.h:102
static bool ApproxEqual(float a, float b, float relative_tolerance=0.001)
return abs(a - b) <= relative_tolerance * (abs(a)+abs(b)).
Definition: kaldi-math.h:262
std::vector< Vector< double > > occs_sub_
Definition: hlda.h:103
void Write ( std::ostream &  os,
bool  binary 
) const

Definition at line 72 of file hlda.cc.

References rnnlm::i, KALDI_ASSERT, HldaAccsDiagGmm::mean_accs_, HldaAccsDiagGmm::mean_accs_sub_, HldaAccsDiagGmm::occs_, HldaAccsDiagGmm::occs_sub_, HldaAccsDiagGmm::S_, HldaAccsDiagGmm::sample_gconst_, HldaAccsDiagGmm::speedup_, kaldi::WriteBasicType(), and kaldi::WriteToken().

72  {
73  WriteToken(os, binary, "<HldaAccsDiagGmm>");
74  WriteToken(os, binary, "<S>");
75  int32 dim = S_.size(); // just the #elems of S_, equals model-dim+1.
76  WriteBasicType(os, binary, dim);
77  for (int32 i = 0; i < dim; i++) S_[i].Write(os, binary);
78  KALDI_ASSERT(mean_accs_.size() == occs_.size());
79  WriteToken(os, binary, "<occs>");
80  int32 npdfs = occs_.size();
81  WriteBasicType(os, binary, npdfs);
82  for (int32 i = 0; i < npdfs; i++)
83  occs_[i].Write(os, binary);
84  WriteToken(os, binary, "<mean_accs>");
85  for (int32 i = 0; i < npdfs; i++)
86  mean_accs_[i].Write(os, binary);
87  WriteToken(os, binary, "<speedup>");
88  WriteBasicType(os, binary, speedup_);
89  if (speedup_ != 1.0) {
90  WriteToken(os, binary, "<occs_sub>");
91  for (int32 i = 0; i < npdfs; i++)
92  occs_sub_[i].Write(os, binary);
93  WriteToken(os, binary, "<mean_accs_sub>");
94  for (int32 i = 0; i < npdfs; i++)
95  mean_accs_sub_[i].Write(os, binary);
96  }
97  WriteToken(os, binary, "<sample_gconst>");
98  WriteBasicType(os, binary, sample_gconst_);
99  WriteToken(os, binary, "</HldaAccsDiagGmm>");
100 }
void Write(std::ostream &os, bool binary) const
Definition: hlda.cc:72
BaseFloat sample_gconst_
Definition: hlda.h:105
std::vector< SpMatrix< double > > S_
Definition: hlda.h:95
std::vector< Matrix< double > > mean_accs_
Definition: hlda.h:98
void WriteToken(std::ostream &os, bool binary, const char *token)
The WriteToken functions are for writing nonempty sequences of non-space characters.
Definition: io-funcs.cc:134
std::vector< Vector< double > > occs_
Definition: hlda.h:97
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:169
std::vector< Matrix< double > > mean_accs_sub_
Definition: hlda.h:104
void WriteBasicType(std::ostream &os, bool binary, T t)
WriteBasicType is the name of the write function for bool, integer types, and floating-point types...
Definition: io-funcs-inl.h:34
BaseFloat speedup_
Definition: hlda.h:102
std::vector< Vector< double > > occs_sub_
Definition: hlda.h:103

Member Data Documentation

std::vector<Matrix<double> > mean_accs_sub_
private
BaseFloat sample_gconst_
private

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