20 #ifndef KALDI_NNET3_NNET_CHAIN_EXAMPLE_H_    21 #define KALDI_NNET3_NNET_CHAIN_EXAMPLE_H_    29 #include "chain/chain-supervision.h"    90                        const chain::Supervision &supervision,
    97   void Write(std::ostream &os, 
bool binary) 
const;
    99   void Read(std::istream &is, 
bool binary);
   121   void Write(std::ostream &os, 
bool binary) 
const;
   122   void Read(std::istream &is, 
bool binary);
   158     return (*
this)(*a, *b);
   173                         std::vector<NnetChainExample> *input,
   193                            const std::vector<std::string> &exclude_names,
   212                                 bool need_model_derivative,
   213                                 bool store_component_stats,
   214                                 bool use_xent_regularization,
   215                                 bool use_xent_derivative,
   237                      NnetChainExampleWriter *writer);
   260   void WriteMinibatch(std::vector<NnetChainExample> *egs);
   270                         std::vector<NnetChainExample*>,
   281 #endif // KALDI_NNET3_NNET_CHAIN_EXAMPLE_H_ 
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
 
Vector< BaseFloat > deriv_weights
This is a vector of per-frame weights, required to be between 0 and 1, that is applied to the derivat...
 
This class is responsible for storing, and displaying in log messages, statistics about how examples ...
 
int32 GetChainNnetExampleSize(const NnetChainExample &a)
This function returns the 'size' of a chain example as defined for purposes of merging egs...
 
chain::Supervision supervision
The supervision object, containing the FST. 
 
std::vector< NnetIo > inputs
'inputs' contains the input to the network– normally just it has just one element called "input"...
 
void MergeChainExamples(bool compress, std::vector< NnetChainExample > *input, NnetChainExample *output)
This function merges a list of NnetChainExample objects into a single one– intended to be used when ...
 
void ShiftChainExampleTimes(int32 frame_shift, const std::vector< std::string > &exclude_names, NnetChainExample *eg)
Shifts the time-index t of everything in the input of "eg" by adding "t_offset" to all "t" values– b...
 
A templated class for writing objects to an archive or script file; see The Table concept...
 
void Write(std::ostream &os, bool binary) const
 
TableWriter< KaldiObjectHolder< NnetChainExample > > NnetChainExampleWriter
 
void Swap(NnetChainSupervision *other)
 
std::string name
the name of the output in the neural net; in simple setups it will just be "output". 
 
The two main classes defined in this header are struct ComputationRequest, which basically defines a ...
 
Allows random access to a collection of objects in an archive or script file; see The Table concept...
 
This hashing object hashes just the structural aspects of the NnetExample without looking at the valu...
 
std::vector< NnetChainSupervision > outputs
'outputs' contains the chain output supervision. 
 
void Read(std::istream &is, bool binary)
 
NnetChainExample is like NnetExample, but specialized for lattice-free (chain) training. 
 
unordered_map< NnetChainExample *, std::vector< NnetChainExample * >, NnetChainExampleStructureHasher, NnetChainExampleStructureCompare > MapType
 
A templated class for reading objects sequentially from an archive or script file; see The Table conc...
 
SequentialTableReader< KaldiObjectHolder< NnetChainExample > > SequentialNnetChainExampleReader
 
RandomAccessTableReader< KaldiObjectHolder< NnetChainExample > > RandomAccessNnetChainExampleReader
 
const ExampleMergingConfig & config_
 
NnetChainExampleWriter * writer_
 
bool operator==(const NnetChainSupervision &other) const
 
ExampleMergingStats stats_
 
A class representing a vector. 
 
This comparator object compares just the structural aspects of the NnetChainExample without looking a...
 
std::vector< Index > indexes
The indexes that the output corresponds to. 
 
This class is responsible for arranging examples in groups that have the same strucure (i...
 
Provides a vector abstraction class. 
 
void GetChainComputationRequest(const Nnet &nnet, const NnetChainExample &eg, bool need_model_derivative, bool store_component_stats, bool use_xent_regularization, bool use_xent_derivative, ComputationRequest *request)
This function takes a NnetChainExample and produces a ComputationRequest.