beam search cannot be parsed correctly.
Created by: lcy-seso
-
This PR https://github.com/PaddlePaddle/Paddle/pull/2288 changes the way v2 APIs parse the network configuration. But currently,
beam search
cannot be parsed correctly. It causes bugs to machine translation in PaddleBook. -
This PR https://github.com/PaddlePaddle/Paddle/pull/2384 fix the training process but hasn't fixed bugs in the generation.
-
I change
is_generating=True
in this line https://github.com/PaddlePaddle/book/blob/develop/08.machine_translation/train.py#L129, the error information go as follows
I0605 18:50:24.263185 18007 Util.cpp:166] commandline: --use_gpu=False --trainer_count=1
F0605 18:50:46.687893 18007 NeuralNetwork.h:94] Check failed: it != layerMap_.end() Unknown layer __decoder_group_eos_layer__@decoder_group
*** Check failure stack trace: ***
@ 0x7f7019fed7bd google::LogMessage::Fail()
@ 0x7f7019ff126c google::LogMessage::SendToLog()
@ 0x7f7019fed2e3 google::LogMessage::Flush()
@ 0x7f7019ff277e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f7019c2afef paddle::NeuralNetwork::getLayer()
@ 0x7f7019c3932c paddle::RecurrentGradientMachine::resizeOrCreateFrames()
@ 0x7f7019c3873b paddle::RecurrentGradientMachine::init()
@ 0x7f7019bd3be9 paddle::RecurrentLayerGroup::initSubNetwork()
@ 0x7f7019c285c5 paddle::NeuralNetwork::init()
@ 0x7f7019c52bde paddle::GradientMachine::create()
@ 0x7f7019fc10cc GradientMachine::createFromPaddleModelPtr()
@ 0x7f7019fc120d GradientMachine::createByConfigProtoStr()
@ 0x7f7019ab07d5 _wrap_GradientMachine_createByConfigProtoStr__SWIG_0
@ 0x7f7019ab0e10 _wrap_GradientMachine_createByConfigProtoStr
@ 0x7f7021f513a3 PyEval_EvalFrameEx
@ 0x7f7021f53130 PyEval_EvalCodeEx
@ 0x7f7021f514a1 PyEval_EvalFrameEx
@ 0x7f7021f53130 PyEval_EvalCodeEx
@ 0x7f7021f514a1 PyEval_EvalFrameEx
@ 0x7f7021f53130 PyEval_EvalCodeEx
@ 0x7f7021edf27d function_call
@ 0x7f7021eb70f3 PyObject_Call
@ 0x7f7021ec9f7f instancemethod_call
@ 0x7f7021eb70f3 PyObject_Call
@ 0x7f7021f0d80e slot_tp_init
@ 0x7f7021f0c478 type_call
@ 0x7f7021eb70f3 PyObject_Call
@ 0x7f7021f50887 PyEval_EvalFrameEx
@ 0x7f7021f53130 PyEval_EvalCodeEx
@ 0x7f7021f514a1 PyEval_EvalFrameEx
@ 0x7f7021f51c56 PyEval_EvalFrameEx
@ 0x7f7021f53130 PyEval_EvalCodeEx
Besides eos_layer
, several other layers are not created in generation.