tensorflow / nmt

TensorFlow Neural Machine Translation Tutorial
Apache License 2.0
6.39k stars 1.96k forks source link

Best Output from Beam Search Decoder #109

Open adakum opened 7 years ago

adakum commented 7 years ago

In decode_and_evaluate function in utils/nmt_utils.py, in case of beam_width > 0, I see the nmt_outputs=nmt_outputs[0]. Link

Is nmt_outputs[0] contains the best translations or nmt_outputs[beam_width-1] ?

After training my models I see in general nmt_outputs[beam_width-1] contains better output that nmt_outputs[0].

johnsonice commented 7 years ago

I have the exact same question, have you figured it out yet?

oahziur commented 7 years ago

@adakum @johnsonice

There is a bug fixes for beam search in tensorflow (https://github.com/tensorflow/tensorflow/commit/18f89c81d288f191abd56501ec6f86fe29265bdd), maybe you can try to see if the top beam gets better result?

You will need to install the latest tf-nightly.