diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-06-09 13:03:12 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-06-09 13:03:12 +0400 |
commit | 2599ef6dc3c895249eef8102dc0374577b9afd14 (patch) | |
tree | a8fe172489d5659de8ec591a0f3e30c9d7a20dcb /mert/kbmira.cpp | |
parent | 48faedb3bdfe1507d19cf2b76fbc81f3be2ff244 (diff) |
Bug fix: kbmira failed to load dense weights.
Diffstat (limited to 'mert/kbmira.cpp')
-rw-r--r-- | mert/kbmira.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mert/kbmira.cpp b/mert/kbmira.cpp index fa01b41a2..7e303bcfe 100644 --- a/mert/kbmira.cpp +++ b/mert/kbmira.cpp @@ -129,13 +129,14 @@ int main(int argc, char** argv) vector<parameter_t> initParams; if(!denseInitFile.empty()) { ifstream opt(denseInitFile.c_str()); - string buffer; istringstream strstrm(buffer); + string buffer; if (opt.fail()) { cerr << "could not open dense initfile: " << denseInitFile << endl; exit(3); } parameter_t val; getline(opt,buffer); + istringstream strstrm(buffer); while(strstrm >> val) initParams.push_back(val); opt.close(); } |