diff options
author | Patrick Simianer <p@simianer.de> | 2015-12-17 15:42:43 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2015-12-17 15:42:43 +0100 |
commit | 7de6a7dc654a37a70999a4e6d06a8fb6efebb82f (patch) | |
tree | c792b1ae12fca91dd59e1b9ff45ba676a97db7b6 /training/dtrain/dtrain_net_interface.cc | |
parent | dee571f50b9ca6e388ce440fef75acb767b0f458 (diff) |
dtrain_net_interface: features, more detailed update debug output
Diffstat (limited to 'training/dtrain/dtrain_net_interface.cc')
-rw-r--r-- | training/dtrain/dtrain_net_interface.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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<weight_t> 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; |