How to output several translation sentences in the OpenNMT-tf code?

when translating each words in the input sentences, the NMT will choose the words with the highest probability. However, I want to select the words with first three highest probabilities, how can I revise the code in the opennmt-tf package so that I can get several translations for each input sentnece?

Does the thread below answer your question?