summaryrefslogtreecommitdiff
path: root/training/dtrain
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-07-18 10:57:56 +0200
committerPatrick Simianer <p@simianer.de>2014-07-18 10:57:56 +0200
commitd7df7aa6ce149f27267082e367ee790524550540 (patch)
tree7d5b71ed883ceba36485900090ae11498f216859 /training/dtrain
parent49671a7f685eb364f7735f4bbda0c05a2dbfe76c (diff)
fix
Diffstat (limited to 'training/dtrain')
-rw-r--r--training/dtrain/dtrain.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/training/dtrain/dtrain.cc b/training/dtrain/dtrain.cc
index b01cf421..ccb50af2 100644
--- a/training/dtrain/dtrain.cc
+++ b/training/dtrain/dtrain.cc
@@ -438,7 +438,7 @@ main(int argc, char** argv)
score_t model_diff = it->first.model - it->second.model;
score_t loss = max(0.0, -1.0 * model_diff);
- if (check && ki == 1) cout << losses[pair_idx] - loss << endl;
+ if (check && ki==repeat-1) cout << losses[pair_idx] - loss << endl;
pair_idx++;
if (repeat > 1) {
@@ -455,7 +455,7 @@ main(int argc, char** argv)
margin = fabs(model_diff);
if (!rank_error && margin < loss_margin) margin_violations++;
}
- if (rank_error && ki==1) rank_errors++;
+ if (rank_error && ki==0) rank_errors++;
if (scale_bleu_diff) eta = it->first.score - it->second.score;
if (rank_error || margin < loss_margin) {
SparseVector<weight_t> diff_vec = it->first.f - it->second.f;