23 #ifndef KALDI_GMM_MLE_AM_DIAG_GMM_H_ 24 #define KALDI_GMM_MLE_AM_DIAG_GMM_H_ 1 39 void Read(std::istream &in_stream,
bool binary,
bool add =
false);
40 void Write(std::ostream &out_stream,
bool binary)
const;
138 #endif // KALDI_GMM_MLE_AM_DIAG_GMM_H_
void MleAmDiagGmmUpdate(const MleDiagGmmOptions &config, const AccumAmDiagGmm &am_diag_gmm_acc, GmmFlagsType flags, AmDiagGmm *am_gmm, BaseFloat *obj_change_out, BaseFloat *count_out)
for computing the maximum-likelihood estimates of the parameters of an acoustic model that uses diago...
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
void MapAmDiagGmmUpdate(const MapDiagGmmOptions &config, const AccumAmDiagGmm &am_diag_gmm_acc, GmmFlagsType flags, AmDiagGmm *am_gmm, BaseFloat *obj_change_out, BaseFloat *count_out)
Maximum A Posteriori update.
This class is for when you are reading something in random access, but it may actually be stored per-...
void SetZero(GmmFlagsType flags)
BaseFloat AccumulateForGmmTwofeats(const AmDiagGmm &model, const VectorBase< BaseFloat > &data1, const VectorBase< BaseFloat > &data2, int32 gmm_index, BaseFloat weight)
Accumulate stats for a single GMM in the model; uses data1 for getting posteriors and data2 for stats...
RandomAccessTableReaderMapped< KaldiObjectHolder< AmDiagGmm > > RandomAccessMapAmDiagGmmReaderMapped
BaseFloat AccumulateForGmm(const AmDiagGmm &model, const VectorBase< BaseFloat > &data, int32 gmm_index, BaseFloat weight)
Accumulate stats for a single GMM in the model; returns log likelihood.
A templated class for writing objects to an archive or script file; see The Table concept...
SequentialTableReader< KaldiObjectHolder< AmDiagGmm > > MapAmDiagGmmSeqReader
BaseFloat TotCount() const
uint16 GmmFlagsType
Bitwise OR of the above flags.
void Add(BaseFloat scale, const AccumAmDiagGmm &other)
Allows random access to a collection of objects in an archive or script file; see The Table concept...
void AccumulateFromPosteriors(const AmDiagGmm &model, const VectorBase< BaseFloat > &data, int32 gmm_index, const VectorBase< BaseFloat > &posteriors)
Accumulates stats for a single GMM in the model using pre-computed Gaussian posteriors.
double total_frames_
Total counts & likelihood (for diagnostics)
BaseFloat TotLogLike() const
void AccumulateForGaussian(const AmDiagGmm &am, const VectorBase< BaseFloat > &data, int32 gmm_index, int32 gauss_index, BaseFloat weight)
Accumulate stats for a single Gaussian component in the model.
TableWriter< KaldiObjectHolder< AmDiagGmm > > MapAmDiagGmmWriter
void Scale(BaseFloat scale)
A templated class for reading objects sequentially from an archive or script file; see The Table conc...
BaseFloat TotStatsCount() const
Configuration variables like variance floor, minimum occupancy, etc.
void Read(std::istream &in_stream, bool binary, bool add=false)
KALDI_DISALLOW_COPY_AND_ASSIGN(AccumAmDiagGmm)
RandomAccessTableReader< KaldiObjectHolder< AmDiagGmm > > RandomAccessMapAmDiagGmmReader
const AccumDiagGmm & GetAcc(int32 index) const
void Write(std::ostream &out_stream, bool binary) const
Provides a vector abstraction class.
void Init(const AmDiagGmm &model, GmmFlagsType flags)
Initializes accumulators for each GMM based on the number of components and dimension.
std::vector< AccumDiagGmm * > gmm_accumulators_
MLE accumulators and update methods for the GMMs.
Configuration variables for Maximum A Posteriori (MAP) update.