farizrahman4u / seq2seq

Sequence to Sequence Learning with Keras
GNU General Public License v2.0
3.17k stars 848 forks source link

Sequence-to-Sequence Viterbi/Beam Search #30

Open nicholaslocascio opened 8 years ago

nicholaslocascio commented 8 years ago

Currently the model always takes greedy decision for each step in the sequence path. During prediction, this is usually not optimal as the best path may not be the greedy path. Beam search is often used to improve the accuracy of sequence generating recurrent neural networks. See http://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks.pdf for reference.

Any plans to implement this search? Or any good direction if I wanted to do this myself?

farizrahman4u commented 8 years ago

Hi, I will have to give the beam search part a thorough read. If you have already read the paper and undersrand the math, simply comment the main equations here (make it simple and use small words :) ) and I could write the layer in no time.

viksit commented 8 years ago

@nicholaslocascio / @farizrahman4u could you point me to the code that does the greedy decision making? Trying to understand your implementation in more detail.

Thanks!

kracwarlock commented 8 years ago

Any updates on this?

wboag commented 8 years ago

+1

0b01 commented 6 years ago

Given the current implementation of recuurentshop. This would be an undertaking if not outright impossible. Look elsewhere