Functions

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...

This function does forward-backward on the numerator and denominator lattices and computes derivates wrt to the output for the specified objective function. More...

Function Documentation

void AppendSupervision

(

const std::vector< const DiscriminativeSupervision * > &

input,

bool

compactify,

std::vector< 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.

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.