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

static void ResetSeed (int32 rand_seed, const Component &c)
 
bool CheckStringsApproxEqual (const std::string &a, const std::string &b, int32 tolerance=3)
 
void TestNnetComponentIo (Component *c)
 
void TestNnetComponentCopy (Component *c)
 
void TestNnetComponentAddScale (Component *c)
 
void TestNnetComponentVectorizeUnVectorize (Component *c)
 
void TestNnetComponentUpdatable (Component *c)
 
ComponentPrecomputedIndexesGetPrecomputedIndexes (const Component &c, int32 num_rows)
 
void TestSimpleComponentPropagateProperties (const Component &c)
 
bool TestSimpleComponentDataDerivative (const Component &c, BaseFloat perturb_delta)
 
bool TestSimpleComponentModelDerivative (const Component &c, BaseFloat perturb_delta, bool test_derivative)
 
void UnitTestNnetComponent ()
 
int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 524 of file nnet-component-test.cc.

References KALDI_LOG, and kaldi::nnet3::UnitTestNnetComponent().

524  {
525  using namespace kaldi;
526  using namespace kaldi::nnet3;
527 #if HAVE_CUDA == 1
528  kaldi::int32 loop = 0;
529  for (loop = 0; loop < 2; loop++) {
530  //CuDevice::Instantiate().SetDebugStrideMode(true);
531  if (loop == 0)
532  CuDevice::Instantiate().SelectGpuId("no");
533  else
534  CuDevice::Instantiate().SelectGpuId("yes");
535 #endif
537 #if HAVE_CUDA == 1
538  } // No for loop if 'HAVE_CUDA != 1',
539  CuDevice::Instantiate().PrintProfile();
540 #endif
541  KALDI_LOG << "Nnet component tests succeeded.";
542 
543  return 0;
544 }
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
kaldi::int32 int32
#define KALDI_LOG
Definition: kaldi-error.h:153