nnetbin/sat-nnet-train-frmshuff.cc注記1
1146 ワード
Nnet読み出し
Nnet nnet;
nnet.Read(model_filename);
nnet.SetTrainOptions(trn_opts);
マッピング・テーブルの構築
std::map<:string int32=""> map_utt2spk;
if (utt2spk != "") {
std::ifstream fi_map(utt2spk.c_str());
if (!fi_map) {
KALDI_ERR << "failed to open file " << utt2spk;
}
std::string key;
int32 value;
while (fi_map >> key >> value) {
map_utt2spk[key] = value;
}
}