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

In the while loop, will the queue explode quickly #5

Open
haorannlp opened this issue Apr 23, 2020 · 0 comments
Open

In the while loop, will the queue explode quickly #5

haorannlp opened this issue Apr 23, 2020 · 0 comments

Comments

@haorannlp
Copy link

When decoding a sentence of length 5 and beamsize=10, and we entered the while loop. After the first while loop, we end up with a queue with length 10. Now we move to T=1. According to the code, we have to run 10 while loops to decode for T=1. So after decoding for T=1, we will end up with a queue of length 100 instead of 10 cause there is no topK selection in the queue. After decoding for T=2, we will have a queue with length 1000. This queue will explode quickly. Did I miss something here?

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

No branches or pull requests

1 participant