Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

机器翻译示例中,我只想输出beam_search中最佳结果对应的gru_decoder_with_attention的out结果,该怎么获取

Open chenbblei opened this issue 8 years ago • 3 comments

链接如下: https://github.com/PaddlePaddle/book/blob/develop/08.machine_translation/train.py 在生成过程中,我不想直接通过beam_search来获取最终的标签id,而是想要的是beam_search得到的最终最佳标签id所对应的gru_decoder_with_attention的输出结果,该如何修改才能获取到

chenbblei avatar May 23 '18 07:05 chenbblei

@chenbblei out的结果不是很方便拿到,gru_decoder_with_attention是在beam search内部调用的,如果要取其输出,得hack代码

kuke avatar May 24 '18 03:05 kuke

@kuke paddle能否开发这样的一个接口或者参数来呢

chenbblei avatar May 24 '18 06:05 chenbblei

这个问题希望paddle同事来开发吧,先关闭了,当前没解决方案

chenbblei avatar May 26 '18 08:05 chenbblei