Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 24 of file gmm-global-sum-accs.cc.
References ParseOptions::GetArg(), rnnlm::i, KALDI_LOG, ParseOptions::NumArgs(), ParseOptions::PrintUsage(), ParseOptions::Read(), AccumDiagGmm::Read(), ParseOptions::Register(), Output::Stream(), Input::Stream(), and AccumDiagGmm::Write().
29 "Sum multiple accumulated stats files for diagonal-covariance GMM " 31 "Usage: gmm-global-sum-accs [options] stats-out stats-in1 stats-in2 ...\n";
35 po.Register(
"binary", &binary,
"Write output in binary mode");
38 if (po.NumArgs() < 2) {
43 std::string stats_out_filename = po.GetArg(1);
46 for (
int i = 2, max = po.NumArgs();
i <= max;
i++) {
47 std::string stats_in_filename = po.GetArg(
i);
50 gmm_accs.
Read(ki.Stream(), binary_read,
true );
56 gmm_accs.
Write(ko.Stream(), binary);
59 KALDI_LOG <<
"Written stats to " << stats_out_filename;
60 }
catch(
const std::exception &e) {
61 std::cerr << e.what() <<
'\n';
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
void Write(std::ostream &out_stream, bool binary) const
void Read(std::istream &in_stream, bool binary, bool add)