From b7bff725993ba7ffc960a46db9b75fc570671ab5 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Wed, 14 Sep 2011 14:47:06 +0100 Subject: fix for more problems caused by hash refactoring --- pro-train/mr_pro_reduce.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pro-train/mr_pro_reduce.cc') 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 x, prev_x; // x[0] is bias if (conf.count("weights")) { Weights::InitFromFile(conf["weights"].as(), &x); + x.resize(FD::NumFeats()); + prev_x = x; + } else { + x.resize(FD::NumFeats()); prev_x = x; } cerr << " Number of features: " << x.size() << endl; -- cgit v1.2.3