convolution-test.cc File Reference
Include dependency graph for convolution-test.cc:

Go to the source code of this file.

Namespaces

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

Functions

static void GetRandomConvolutionModel (ConvolutionModel *model)
 
static void GetRandomConvolutionIndexes (const ConvolutionModel &model, std::vector< Index > *input_indexes, std::vector< Index > *output_indexes)
 
void UnitTestTimeHeightConvolutionIo ()
 
void TestComputationIo (const ConvolutionComputation &computation)
 
void ZeroBlankRows (const std::vector< Index > &indexes, CuMatrix< BaseFloat > *matrix)
 
void ConvolveForwardSimple (const ConvolutionModel &model, const std::vector< Index > &input_indexes, const std::vector< Index > &output_indexes, const CuMatrixBase< BaseFloat > &input_cu, const CuMatrixBase< BaseFloat > &params_cu, CuMatrixBase< BaseFloat > *output_cu)
 
void TestRunningComputation (const ConvolutionModel &conv_model, const std::vector< Index > &input_indexes, const std::vector< Index > &output_indexes, const ConvolutionComputation &computation)
 
void TestDataBackprop (const ConvolutionModel &conv_model, const std::vector< Index > &input_indexes, const std::vector< Index > &output_indexes, const ConvolutionComputation &computation)
 
void TestParamsBackprop (const ConvolutionModel &conv_model, const std::vector< Index > &input_indexes, const std::vector< Index > &output_indexes, const ConvolutionComputation &computation)
 
void UnitTestTimeHeightConvolutionCompile ()
 
void UnitTestTimeHeightConvolution ()
 
int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 449 of file convolution-test.cc.

References rnnlm::i, and kaldi::nnet3::time_height_convolution::UnitTestTimeHeightConvolution().

449  {
450  using namespace kaldi;
451  using namespace kaldi::nnet3;
453  for (int32 loop = 0; loop < 2; loop++) {
454 #if HAVE_CUDA == 1
455  CuDevice::Instantiate().SetDebugStrideMode(true);
456  if (loop == 0)
457  CuDevice::Instantiate().SelectGpuId("no"); // -1 means no GPU
458  else
459  CuDevice::Instantiate().SelectGpuId("optional"); // -2 .. automatic selection
460 #endif
461  for (int32 i = 0; i < 5; i++) {
463  }
464  }
465 }
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
kaldi::int32 int32