Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beam search backtracking #5

Open
shubhamagarwal92 opened this issue Jun 24, 2018 · 2 comments
Open

Beam search backtracking #5

shubhamagarwal92 opened this issue Jun 24, 2018 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@shubhamagarwal92
Copy link

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.

@nirbhayjm nirbhayjm added the question Further information is requested label Jun 24, 2018
@nirbhayjm
Copy link
Member

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 nirbhayjm self-assigned this Jun 24, 2018
@shubhamagarwal92
Copy link
Author

Thanks for the prompt reply. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants