nnet-derivative-test.cc File Reference
Include dependency graph for nnet-derivative-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
 

Functions

void ComputeMinAndMaxTimes (const std::vector< Index > &indexes, int32 *min_t, int32 *max_t)
 
void SetDerivTimesOptions (const ComputationRequest &request, NnetOptimizeOptions *opt_config)
 
void UnitTestNnetModelDerivatives ()
 
void UnitTestNnetInputDerivatives ()
 
int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 421 of file nnet-derivative-test.cc.

References KALDI_LOG, kaldi::SetVerboseLevel(), kaldi::nnet3::UnitTestNnetInputDerivatives(), and kaldi::nnet3::UnitTestNnetModelDerivatives().

421  {
422  using namespace kaldi;
423  using namespace kaldi::nnet3;
424  SetVerboseLevel(3);
425 #if HAVE_CUDA == 1
426  kaldi::int32 loop = 0;
427  for (loop = 0; loop < 2; loop++) {
428  CuDevice::Instantiate().SetDebugStrideMode(true);
429  if (loop == 0)
430  CuDevice::Instantiate().SelectGpuId("no");
431  else
432  CuDevice::Instantiate().SelectGpuId("yes");
433 #endif
436 #if HAVE_CUDA == 1
437  } // No for loop if 'HAVE_CUDA != 1',
438  CuDevice::Instantiate().PrintProfile();
439 #endif
440  KALDI_LOG << "Nnet derivative tests succeeded.";
441 
442  return 0;
443 }
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
kaldi::int32 int32
void UnitTestNnetModelDerivatives()
void SetVerboseLevel(int32 i)
This should be rarely used, except by programs using Kaldi as library; command-line programs set the ...
Definition: kaldi-error.h:64
void UnitTestNnetInputDerivatives()
#define KALDI_LOG
Definition: kaldi-error.h:153