27 int main(
int argc, 
char *argv[]) {
    29     using namespace kaldi;
    34         "Add mixture-components to a neural net (comparable to mixtures in a Gaussian\n"    35         "mixture model).  Number of mixture components must be greater than the number\n"    38         "Usage:  nnet-am-mixup [options] <nnet-in> <nnet-out>\n"    40         " nnet-am-mixup --power=0.3 --num-mixtures=5000 1.mdl 2.mdl\n";
    43     bool binary_write = 
true;
    55     std::string nnet_rxfilename = po.
GetArg(1),
    56         nnet_wxfilename = po.
GetArg(2);
    62       Input ki(nnet_rxfilename, &binary);
    70       Output ko(nnet_wxfilename, binary_write);
    74     KALDI_LOG << 
"Mixed up neural net from " << nnet_rxfilename
    75               << 
" and wrote it to " << nnet_wxfilename;
    77   } 
catch(
const std::exception &e) {
    78     std::cerr << e.what() << 
'\n';
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
 
int main(int argc, char *argv[])
 
void PrintUsage(bool print_command_line=false)
Prints the usage documentation [provided in the constructor]. 
 
void Read(std::istream &is, bool binary)
 
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
 
void Register(OptionsItf *opts)
 
void Read(std::istream &is, bool binary)
 
void Write(std::ostream &os, bool binary) const
 
int Read(int argc, const char *const *argv)
Parses the command line options and fills the ParseOptions-registered variables. 
 
std::string GetArg(int param) const
Returns one of the positional parameters; 1-based indexing for argc/argv compatibility. 
 
int NumArgs() const
Number of positional parameters (c.f. argc-1). 
 
void Write(std::ostream &os, bool binary) const
 
const Nnet & GetNnet() const
 
void MixupNnet(const NnetMixupConfig &mixup_config, Nnet *nnet)
This function works as follows.