From 62ceb12a0491d9490f02332422cce2613163a20c Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Tue, 3 May 2016 12:52:51 +0200
Subject: fix
---
training/dtrain/dtrain_net_interface.cc | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/training/dtrain/dtrain_net_interface.cc b/training/dtrain/dtrain_net_interface.cc
index 8dcc3d27..761930f8 100644
--- a/training/dtrain/dtrain_net_interface.cc
+++ b/training/dtrain/dtrain_net_interface.cc
@@ -250,9 +250,8 @@ main(int argc, char** argv)
rsz.push_back(r.size());
}
- //vector* samples;
- for (auto s: *samples)
- s.gold = observer->scorer_->Score(s.w, refs, rsz);
+ for (size_t r = 0; r < samples->size(); r++)
+ (*samples)[r].gold = observer->scorer_->Score((*samples)[r].w, refs, rsz);
}
}
}
@@ -262,9 +261,6 @@ main(int argc, char** argv)
// decode
lambdas.init_vector(&decoder_weights);
- //observer->SetReference(refs, rsz);
- //decoder.Decode(source, observer);
- //vector* samples = observer->GetSamples();
// debug --
debug_output << "\"1best\":\"";
@@ -286,12 +282,14 @@ main(int argc, char** argv)
}
debug_output << endl;
}
+
debug_output << "]," << endl;
debug_output << "\"samples_size\":" << samples->size() << "," << endl;
debug_output << "\"weights_before\":{" << endl;
sparseVectorToJson(lambdas, debug_output);
debug_output << "}," << endl;
// -- debug
+ //
// get pairs
SparseVector update;
--
cgit v1.2.3