summaryrefslogtreecommitdiff
path: root/training
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
commitc877a8e27f34e3b7d72ec07da121f30431d194fd (patch)
tree5c5144776e8493528ec5fd2d77d28e73f1af36d5 /training
parent38226f8be5b54ccd79e2456216f7486a9249780d (diff)
fix
Diffstat (limited to 'training')
-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;