From e96dfde0014c552922e866a56b31335ff894b8a0 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 10 Mar 2016 15:55:02 +0100 Subject: don't waste time --- training/dtrain/dtrain_net_interface.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'training') diff --git a/training/dtrain/dtrain_net_interface.cc b/training/dtrain/dtrain_net_interface.cc index f2f200ef..8dcc3d27 100644 --- a/training/dtrain/dtrain_net_interface.cc +++ b/training/dtrain/dtrain_net_interface.cc @@ -87,6 +87,8 @@ main(int argc, char** argv) string done = "done"; + vector* samples; + size_t i = 0; while(true) { @@ -214,7 +216,7 @@ main(int argc, char** argv) observer->dont_score = true; decoder.Decode(parts[1], observer); observer->dont_score = false; - vector* samples = observer->GetSamples(); + samples = observer->GetSamples(); ostringstream os; cerr << "[dtrain] 1best features " << (*samples)[0].f << endl; if (output_derivation) { @@ -247,6 +249,10 @@ main(int argc, char** argv) refs.emplace_back(MakeNgrams(r, N)); rsz.push_back(r.size()); } + + //vector* samples; + for (auto s: *samples) + s.gold = observer->scorer_->Score(s.w, refs, rsz); } } } @@ -256,9 +262,9 @@ main(int argc, char** argv) // decode lambdas.init_vector(&decoder_weights); - observer->SetReference(refs, rsz); - decoder.Decode(source, observer); - vector* samples = observer->GetSamples(); + //observer->SetReference(refs, rsz); + //decoder.Decode(source, observer); + //vector* samples = observer->GetSamples(); // debug -- debug_output << "\"1best\":\""; -- cgit v1.2.3