visdial-rl icon indicating copy to clipboard operation
visdial-rl copied to clipboard

Beam search backtracking

Open shubhamagarwal92 opened this issue 6 years ago • 2 comments

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.

shubhamagarwal92 avatar Jun 24 '18 21:06 shubhamagarwal92

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).

nirbhayjm avatar Jun 24 '18 21:06 nirbhayjm

Thanks for the prompt reply. :)

shubhamagarwal92 avatar Jun 24 '18 22:06 shubhamagarwal92