nnet-example-functions.cc File Reference
Include dependency graph for nnet-example-functions.cc:

Go to the source code of this file.

Classes

class  DiscriminativeExampleSplitter
 For each frame, judge: More...
 
struct  DiscriminativeExampleSplitter::FrameInfo
 

Namespaces

 kaldi
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference:
 
 kaldi::nnet2
 

Functions

bool LatticeToDiscriminativeExample (const std::vector< int32 > &alignment, const Matrix< BaseFloat > &feats, const CompactLattice &clat, BaseFloat weight, int32 left_context, int32 right_context, DiscriminativeNnetExample *eg)
 Converts lattice to discriminative training example. More...
 
void SplitDiscriminativeExample (const SplitDiscriminativeExampleConfig &config, const TransitionModel &tmodel, const DiscriminativeNnetExample &eg, std::vector< DiscriminativeNnetExample > *egs_out, SplitExampleStats *stats_out)
 Split a "discriminative example" into multiple pieces, splitting where the lattice has "pinch points". More...
 
void ExciseDiscriminativeExample (const SplitDiscriminativeExampleConfig &config, const TransitionModel &tmodel, const DiscriminativeNnetExample &eg, std::vector< DiscriminativeNnetExample > *egs_out, SplitExampleStats *stats_out)
 Remove unnecessary frames from discriminative training example. More...
 
void UpdateHash (const TransitionModel &tmodel, const DiscriminativeNnetExample &eg, std::string criterion, bool drop_frames, bool one_silence_class, Matrix< double > *hash, double *num_weight, double *den_weight, double *tot_t)
 This function is used in code that tests the functionality that we provide here, about splitting and excising nnet examples. More...
 
void ExampleToPdfPost (const TransitionModel &tmodel, const std::vector< int32 > &silence_phones, std::string criterion, bool drop_frames, bool one_silence_class, const DiscriminativeNnetExample &eg, Posterior *post)
 Given a discriminative training example, this function works out posteriors at the pdf level (note: these are "discriminative-training posteriors" that may be positive or negative. More...
 
void SolvePackingProblem (BaseFloat max_cost, const std::vector< BaseFloat > &costs, std::vector< std::vector< size_t > > *groups)
 This function solves the "packing problem" using the "first fit" algorithm. More...
 
void AppendDiscriminativeExamples (const std::vector< const DiscriminativeNnetExample * > &input, DiscriminativeNnetExample *output)
 Appends the given vector of examples (which must be non-empty) into a single output example (called by CombineExamples, which might be a more convenient interface). More...
 
void CombineDiscriminativeExamples (int32 max_length, const std::vector< DiscriminativeNnetExample > &input, std::vector< DiscriminativeNnetExample > *output)
 This function is used to combine multiple discriminative-training examples (each corresponding to a segment of a lattice), into one. More...