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 #176

Open
asmartsnail opened this issue Oct 30, 2018 · 0 comments
Open

beam search #176

asmartsnail opened this issue Oct 30, 2018 · 0 comments

Comments

@asmartsnail
Copy link

topk_decoder = TopKDecoder(decoder, 5) seq2seq = Seq2seq(encoder, topk_decoder)
When I use the above code in sample.py, I get the following error.
image
When I make the following changes in TopKDecoder.py, the code can run successfully, but the accuracy is only about 0.2.
Where is the problem?
metadata['sequence'] = [seq[0] for seq in p] =》metadata['sequence'] = [seq[:,0,:] for seq in p]

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