Commit e4e51628 by xiaotong

setting of length alpha

parent cc6319e4
...@@ -59,7 +59,7 @@ void T2TSearch::Init(int argc, char ** argv) ...@@ -59,7 +59,7 @@ void T2TSearch::Init(int argc, char ** argv)
{ {
LoadParamInt(argc, argv, "beamsize", &beamSize, 1); LoadParamInt(argc, argv, "beamsize", &beamSize, 1);
LoadParamInt(argc, argv, "batchsize", &batchSize, 1); LoadParamInt(argc, argv, "batchsize", &batchSize, 1);
LoadParamFloat(argc, argv, "lenalpha", &alpha, 0.6F); LoadParamFloat(argc, argv, "lenalpha", &alpha, 1.0F);
LoadParamInt(argc, argv, "endid", endSymbols, -1); LoadParamInt(argc, argv, "endid", endSymbols, -1);
LoadParamInt(argc, argv, "startid", &startSymbol, -1); LoadParamInt(argc, argv, "startid", &startSymbol, -1);
...@@ -472,7 +472,7 @@ void T2TSearch::Collect(T2TStateBundle * beam) ...@@ -472,7 +472,7 @@ void T2TSearch::Collect(T2TStateBundle * beam)
"Invalid sample id!"); "Invalid sample id!");
/* we push the hypothesis into the heap when it is completed */ /* we push the hypothesis into the heap when it is completed */
if(state.isEnd != 0) if(state.isEnd)
fullHypos[state.pid].Push(HeapNode<float>(&state, state.modelScore)); fullHypos[state.pid].Push(HeapNode<float>(&state, state.modelScore));
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论