mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-11-10 10:59:21 +03:00
history update
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/mira-mtm5@3536 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
9b264767a7
commit
44f14c776d
@ -174,7 +174,7 @@ int main(int argc, char** argv) {
|
||||
allScores[0],
|
||||
allLosses[0]);
|
||||
|
||||
//set loss for each sentence ss oracleloss - rawsentenceloss
|
||||
//set loss for each sentence as oracleloss - rawsentenceloss
|
||||
for (size_t i = 0; i < allScores.size(); ++i) {
|
||||
for (size_t j = 0; j < allScores[i].size(); ++j) {
|
||||
allLosses[i][j] = oracleLoss - allLosses[i][j];
|
||||
@ -191,6 +191,9 @@ int main(int argc, char** argv) {
|
||||
|
||||
//update moses weights
|
||||
decoder->setWeights(mosesWeights);
|
||||
|
||||
//history (for approx doc bleu)
|
||||
decoder->updateHistory(oracle);
|
||||
|
||||
cumulativeWeights.PlusEquals(mosesWeights);
|
||||
cerr << "Cumulative weights: " << cumulativeWeights << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user