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? #28

hunkim opened this issue Nov 9, 2016 · 1 comment

Beam search? #28

hunkim opened this issue Nov 9, 2016 · 1 comment


Copy link

hunkim commented Nov 9, 2016

Currently, we are using weighted_pick to select outputs:

def weighted_pick(weights):
            t = np.cumsum(weights)
            s = np.sum(weights)
            return(int(np.searchsorted(t, np.random.rand(1)*s)))

Should we also add beam search as an option?

See beam search implementations in Tensorflow tensorflow/tensorflow#654!

Copy link

Rojina99 commented Aug 16, 2017

Can you please explain why cumulative sum is used here ?

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

No branches or pull requests

2 participants