From 9cc64edcdbeb463b27c3ef37c892cc404c5cf8b4 Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Fri, 16 Oct 2015 12:37:08 +0200
Subject: dtrain: fixes
---
training/dtrain/update.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'training/dtrain/update.h')
diff --git a/training/dtrain/update.h b/training/dtrain/update.h
index 1c51c4f1..30b14771 100644
--- a/training/dtrain/update.h
+++ b/training/dtrain/update.h
@@ -26,7 +26,7 @@ updates_multipartite(vector* sample,
size_t up = 0;
size_t sz = sample->size();
if (sz < 2) return 0;
- sort(sample->begin(), sample->end(), [](Hyp& first, Hyp& second)
+ sort(sample->begin(), sample->end(), [](Hyp first, Hyp second)
{
return first.gold > second.gold;
});
@@ -95,7 +95,7 @@ updates_all(vector* sample,
{
size_t up = 0;
size_t sz = sample->size();
- sort(sample->begin(), sample->end(), [](Hyp& first, Hyp& second)
+ sort(sample->begin(), sample->end(), [](Hyp first, Hyp second)
{
return first.gold > second.gold;
});
@@ -129,13 +129,13 @@ update_structured(vector* sample,
ostream& os=cout)
{
// hope
- sort(sample->begin(), sample->end(), [](Hyp& first, Hyp& second)
+ sort(sample->begin(), sample->end(), [](Hyp first, Hyp second)
{
return (first.model+first.gold) > (second.model+second.gold);
});
Hyp hope = (*sample)[0];
// fear
- sort(sample->begin(), sample->end(), [](Hyp& first, Hyp& second)
+ sort(sample->begin(), sample->end(), [](Hyp first, Hyp second)
{
return (first.model-first.gold) > (second.model-second.gold);
});
--
cgit v1.2.3