Open shubhamagarwal92 opened 6 years ago
The main beam search function has details about how dropped sequences are handles and how backtracking is performed.
Briefly, the sequences which see EOS are handled by this variable which keeps track of all sequences which have not yet seen EOS. The beamTokensTable
variable stores all the tokens generated as beam search progresses, with the corresponding back-track indices stored in the backIndices
table (updated after each time step here).
Thanks for the prompt reply. :)
Hi,
Thank you providing this code.
Could you explain your code for backtracking in beam search.
In particular how do you handle the dropped sequences that have seen EOS earlier during forward phase as done in this implementation.