nnet-component-test.cc File Reference
#include <sstream>
#include <fstream>
#include <algorithm>
#include "nnet/nnet-component.h"
#include "nnet/nnet-nnet.h"
#include "nnet/nnet-convolutional-component.h"
#include "nnet/nnet-max-pooling-component.h"
#include "util/common-utils.h"
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::nnet1
 

Functions

template<typename Real >
void ReadCuMatrixFromString (const std::string &s, CuMatrix< Real > *m)
 
ComponentReadComponentFromString (const std::string &s)
 
void UnitTestLengthNorm ()
 
void UnitTestSimpleSentenceAveragingComponent ()
 
void UnitTestConvolutionalComponentUnity ()
 
void UnitTestConvolutionalComponent3x3 ()
 
void UnitTestMaxPoolingComponent ()
 
void UnitTestDropoutComponent ()
 
int main ()
 

Function Documentation

◆ main()

int main ( )

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

References KALDI_LOG, kaldi::nnet1::UnitTestConvolutionalComponent3x3(), kaldi::nnet1::UnitTestConvolutionalComponentUnity(), kaldi::nnet1::UnitTestDropoutComponent(), kaldi::nnet1::UnitTestLengthNorm(), kaldi::nnet1::UnitTestMaxPoolingComponent(), and kaldi::nnet1::UnitTestSimpleSentenceAveragingComponent().

270  {
271  using namespace kaldi;
272  using namespace kaldi::nnet1;
273 
274  for (kaldi::int32 loop = 0; loop < 2; loop++) {
275 #if HAVE_CUDA == 1
276  if (loop == 0)
277  // use no GPU,
278  CuDevice::Instantiate().SelectGpuId("no");
279  else
280  // use GPU when available,
281  CuDevice::Instantiate().SelectGpuId("optional");
282 #endif
283  // unit-tests :
290  // end of unit-tests,
291  if (loop == 0)
292  KALDI_LOG << "Tests without GPU use succeeded.";
293  else
294  KALDI_LOG << "Tests with GPU use (if available) succeeded.";
295  }
296 #if HAVE_CUDA == 1
297  CuDevice::Instantiate().PrintProfile();
298 #endif
299  return 0;
300 }
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
kaldi::int32 int32
void UnitTestSimpleSentenceAveragingComponent()
void UnitTestConvolutionalComponentUnity()
void UnitTestDropoutComponent()
void UnitTestConvolutionalComponent3x3()
void UnitTestMaxPoolingComponent()
#define KALDI_LOG
Definition: kaldi-error.h:153