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

Adding beam search #1

Open
ghost opened this issue Jun 21, 2018 · 0 comments
Open

Adding beam search #1

ghost opened this issue Jun 21, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 21, 2018

Nice work @anuragmishracse and the implementation is almost perfect.

While prediction,can you help me by adding beam search(say k=3,5,7 are beam sizes) instead of taking the best case by using argmax.

def predict(self, image_path):
image = self.read_image(image_name)
prediction = self.model.predict(np.asarray([image]))
prediction = np.argmax(prediction, axis=1)
return self.rev_label_map[prediction]

I have my input in the similar format and is working fine for the argmax,but it is really urgent for me to test with the beam search.please help me by adding beam search.Thanking you in advance.

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

0 participants