Commit 3b93be69 by liyinqiao

Bug fixed.

Fix the minor bugs in Transformer.
parent 51b66f12
...@@ -63,7 +63,7 @@ void T2TTranslator::Init(T2TConfig& config) ...@@ -63,7 +63,7 @@ void T2TTranslator::Init(T2TConfig& config)
((BeamSearch*)seacher)->Init(config); ((BeamSearch*)seacher)->Init(config);
} }
else if (beamSize == 1) { else if (beamSize == 1) {
XPRINT1(0, stderr, "Translating with greedy search\n", beamSize); XPRINT1(0, stderr, "Translating with greedy search (%d)\n", beamSize);
seacher = new GreedySearch(); seacher = new GreedySearch();
((GreedySearch*)seacher)->Init(config); ((GreedySearch*)seacher)->Init(config);
} }
...@@ -169,7 +169,7 @@ void T2TTranslator::Translate(const char* ifn, const char* sfn, const char* tfn, ...@@ -169,7 +169,7 @@ void T2TTranslator::Translate(const char* ifn, const char* sfn, const char* tfn,
double elapsed = GetClockSec() - startDump; double elapsed = GetClockSec() - startDump;
XPRINT2(0, stderr, "[INFO] translation completed (word=%d, sent=%llu)\n", XPRINT2(0, stderr, "[INFO] translation completed (word=%d, sent=%ld)\n",
wordCountTotal, batchLoader.inputBuffer.Size() + batchLoader.emptyLines.Size()); wordCountTotal, batchLoader.inputBuffer.Size() + batchLoader.emptyLines.Size());
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论