Open hunkim opened 7 years ago
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!
Can you please explain why cumulative sum is used here ?
Currently, we are using weighted_pick to select outputs:
Should we also add beam search as an option?
See beam search implementations in Tensorflow https://github.com/tensorflow/tensorflow/issues/654!