word-rnn-tensorflow icon indicating copy to clipboard operation
word-rnn-tensorflow copied to clipboard

Beam search?

Open hunkim opened this issue 8 years ago • 1 comments

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 https://github.com/tensorflow/tensorflow/issues/654!

hunkim avatar Nov 09 '16 23:11 hunkim

Can you please explain why cumulative sum is used here ?

Rojina99 avatar Aug 16 '17 09:08 Rojina99