diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-09-14 14:47:06 +0100 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-09-14 14:47:06 +0100 |
commit | 9acb1f98b698f9fd0c09f6b7c122011651dcc435 (patch) | |
tree | c04cf62e60462d640a42f42f2ac2db19ef3b0169 /pro-train | |
parent | fc5c72f9c5ce60c5d9a3dcd363eb51ccdd543bc9 (diff) |
fix for more problems caused by hash refactoring
Diffstat (limited to 'pro-train')
-rw-r--r-- | pro-train/mr_pro_reduce.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pro-train/mr_pro_reduce.cc b/pro-train/mr_pro_reduce.cc index 6b491918..aff410a0 100644 --- a/pro-train/mr_pro_reduce.cc +++ b/pro-train/mr_pro_reduce.cc @@ -218,6 +218,10 @@ int main(int argc, char** argv) { vector<weight_t> x, prev_x; // x[0] is bias if (conf.count("weights")) { Weights::InitFromFile(conf["weights"].as<string>(), &x); + x.resize(FD::NumFeats()); + prev_x = x; + } else { + x.resize(FD::NumFeats()); prev_x = x; } cerr << " Number of features: " << x.size() << endl; |