nnet-batch-compute.cc File Reference
#include <algorithm>
#include <iomanip>
#include "nnet3/nnet-batch-compute.h"
#include "nnet3/nnet-utils.h"
#include "decoder/decodable-matrix.h"
Include dependency graph for nnet-batch-compute.cc:

Go to the source code of this file.


 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference:
 This namespace contains things needed for the implementation of the function NnetBatchComputer::SplitUtteranceIntoTasks().


void GetOutputFrameInfoForTasks (const NnetBatchComputerOptions &opts, int32 num_subsampled_frames, int32 num_subsampled_frames_per_chunk, std::vector< NnetInferenceTask > *tasks)
 This function figures out how many chunks are needed for this utterance, sets 'tasks' to a vector with that many elements, and sets up the following elements in 'tasks': output_t_stride num_output_frames num_initial_unused_output_frames num_used_output_frames. More...
void AddOnlineIvectorsToTasks (const NnetBatchComputerOptions &opts, const CuMatrix< BaseFloat > &online_ivectors, int32 online_ivector_period, std::vector< NnetInferenceTask > *tasks)
static void SplitInputToTasks (const NnetBatchComputerOptions &opts, int32 nnet_left_context, int32 nnet_right_context, const CuMatrix< BaseFloat > &input, std::vector< NnetInferenceTask > *tasks)
 This function sets up the 'input' and 'first_input_t' and 'is_edge' members of the 'tasks' array; it is responsible for working out, for each task, which input frames it needs (including left-context and right-context). More...
void MergeTaskOutput (const std::vector< NnetInferenceTask > &tasks, Matrix< BaseFloat > *output)
 Merges together the 'output_cpu' (if the 'output_to_cpu' members are true) or the 'output' members of 'tasks' into a single CPU matrix 'output'. More...
void MergeTaskOutput (const std::vector< NnetInferenceTask > &tasks, CuMatrix< BaseFloat > *output)