Classes | |
| class | DiscriminativeComputation |
| struct | DiscriminativeObjectiveInfo |
| struct | DiscriminativeOptions |
| struct | DiscriminativeSupervision |
| class | DiscriminativeSupervisionSplitter |
| struct | SplitDiscriminativeSupervisionOptions |
Functions | |
| void | MergeSupervision (const std::vector< const DiscriminativeSupervision * > &input, DiscriminativeSupervision *output_supervision) |
| This function appends a list of supervision objects to create what will usually be a single such object, but if the weights and num-frames are not all the same it will only append Supervision objects where successive ones have the same weight and num-frames, and if 'compactify' is true. More... | |
| void | ComputeDiscriminativeObjfAndDeriv (const DiscriminativeOptions &opts, const TransitionModel &tmodel, const CuVectorBase< BaseFloat > &log_priors, const DiscriminativeSupervision &supervision, const CuMatrixBase< BaseFloat > &nnet_output, DiscriminativeObjectiveInfo *stats, CuMatrixBase< BaseFloat > *nnet_output_deriv, CuMatrixBase< BaseFloat > *xent_output_deriv) |
| This function does forward-backward on the numerator and denominator lattices and computes derivates wrt to the output for the specified objective function. More... | |
| void ComputeDiscriminativeObjfAndDeriv | ( | const DiscriminativeOptions & | opts, |
| const TransitionModel & | tmodel, | ||
| const CuVectorBase< BaseFloat > & | log_priors, | ||
| const DiscriminativeSupervision & | supervision, | ||
| const CuMatrixBase< BaseFloat > & | nnet_output, | ||
| DiscriminativeObjectiveInfo * | stats, | ||
| CuMatrixBase< BaseFloat > * | nnet_output_deriv, | ||
| CuMatrixBase< BaseFloat > * | xent_output_deriv | ||
| ) |
This function does forward-backward on the numerator and denominator lattices and computes derivates wrt to the output for the specified objective function.
| [in] | opts | Struct containing options |
| [in] | tmodel | Transition model |
| [in] | log_priors | Vector of log-priors for pdfs |
| [in] | supervision | The supervision object, containing the numerator and denominator paths. The denominator is always a lattice. The numerator is an alignment. |
| [in] | nnet_output | The output of the neural net; dimension must equal ((supervision.num_sequences * supervision.frames_per_sequence) by tmodel.NumPdfs()). |
| [out] | stats | Statistics accumulated during training such as the objective function and the total weight. |
| [out] | xent_output_deriv | If non-NULL, then the xent objective derivative (which equals a posterior from the numerator forward-backward, scaled by the supervision weight) is written to here. This will be used in the cross-entropy regularization code. |
Definition at line 546 of file discriminative-training.cc.
References DiscriminativeComputation::Compute().
Referenced by DiscriminativeObjectiveInfo::AccumulateOutput(), NnetDiscriminativeComputeObjf::ProcessOutputs(), and NnetDiscriminativeTrainer::ProcessOutputs().
| void MergeSupervision | ( | const std::vector< const DiscriminativeSupervision * > & | input, |
| DiscriminativeSupervision * | output_supervision | ||
| ) |
This function appends a list of supervision objects to create what will usually be a single such object, but if the weights and num-frames are not all the same it will only append Supervision objects where successive ones have the same weight and num-frames, and if 'compactify' is true.
The normal use-case for this is when you are combining neural-net examples for training; appending them like this helps to simplify the training process.
Definition at line 402 of file discriminative-supervision.cc.
References DiscriminativeSupervision::Check(), DiscriminativeSupervision::den_lat, DiscriminativeSupervision::frames_per_sequence, rnnlm::i, KALDI_ASSERT, KALDI_ERR, DiscriminativeSupervision::num_ali, DiscriminativeSupervision::num_sequences, and DiscriminativeSupervision::weight.
Referenced by kaldi::nnet3::MergeSupervision().