From 7de6a7dc654a37a70999a4e6d06a8fb6efebb82f Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 17 Dec 2015 15:42:43 +0100 Subject: dtrain_net_interface: features, more detailed update debug output --- training/dtrain/dtrain_net_interface.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'training/dtrain/dtrain_net_interface.cc') diff --git a/training/dtrain/dtrain_net_interface.cc b/training/dtrain/dtrain_net_interface.cc index f16b9304..77ccde55 100644 --- a/training/dtrain/dtrain_net_interface.cc +++ b/training/dtrain/dtrain_net_interface.cc @@ -143,7 +143,7 @@ main(int argc, char** argv) cerr << "[dtrain] learning ..." << endl; source = parts[0]; // debug -- - debug_output << "\"source\":\"" << source.substr(source.find_first_of(">")+1, source.find_last_of("<")-3) << "\"," << endl; + debug_output << "\"source\":\"" << source.substr(source.find_first_of(">")+2, source.find_last_of(">")-6) << "\"," << endl; debug_output << "\"target\":\"" << parts[1] << "\"," << endl; // -- debug parts.erase(parts.begin()); @@ -198,11 +198,14 @@ main(int argc, char** argv) // get pairs and update SparseVector updates; size_t num_up = CollectUpdates(samples, updates, margin); + debug_output << "\"1best_features\":\"" << (*samples)[0].f << "\"," << endl; + debug_output << "\"update_raw\":\"" << updates << "\"," << endl; updates *= eta_sparse; // apply learning rate for sparse features for (auto feat: dense_features) { // apply learning rate for dense features updates[FD::Convert(feat)] /= eta_sparse; updates[FD::Convert(feat)] *= eta; } + debug_output << "\"update\":\"" << updates << "\"," << endl; // debug -- debug_output << "\"num_up\":" << num_up << "," << endl; debug_output << "\"updated_features\":" << updates.size() << "," << endl; -- cgit v1.2.3