nnet3-info.cc File Reference
Include dependency graph for nnet3-info.cc:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 24 of file nnet3-info.cc.

References ParseOptions::GetArg(), Nnet::Info(), ParseOptions::NumArgs(), ParseOptions::PrintUsage(), ParseOptions::Read(), and kaldi::ReadKaldiObject().

24  {
25  try {
26  using namespace kaldi;
27  using namespace kaldi::nnet3;
28  typedef kaldi::int32 int32;
29 
30  const char *usage =
31  "Print some text information about 'raw' nnet3 neural network, to\n"
32  "standard output\n"
33  "\n"
34  "Usage: nnet3-info [options] <raw-nnet>\n"
35  "e.g.:\n"
36  " nnet3-info 0.raw\n"
37  "See also: nnet3-am-info\n";
38 
39  ParseOptions po(usage);
40 
41  po.Read(argc, argv);
42 
43  if (po.NumArgs() != 1) {
44  po.PrintUsage();
45  exit(1);
46  }
47 
48  std::string raw_nnet_rxfilename = po.GetArg(1);
49 
50  Nnet nnet;
51  ReadKaldiObject(raw_nnet_rxfilename, &nnet);
52 
53  std::cout << nnet.Info();
54 
55  return 0;
56  } catch(const std::exception &e) {
57  std::cerr << e.what() << '\n';
58  return -1;
59  }
60 }
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
kaldi::int32 int32
void ReadKaldiObject(const std::string &filename, Matrix< float > *m)
Definition: kaldi-io.cc:832
std::string Info() const
returns some human-readable information about the network, mostly for debugging purposes.
Definition: nnet-nnet.cc:821
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
Definition: parse-options.h:36