Sachin19 / seq2seq-con

Implementation of "Von Mises-Fisher Loss for Training Sequence to Sequence Models with Continuous Outputs"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

function returns nothing

serjtroshin opened this issue · comments

self._eos_top and (len(self.finished) >= 1)

Thanks for pointing this out! I have fixed it.

Thanks! Also here you iterate over n_best hypotheses. But since you want to kill beam when eos is in the top hypothesis, you might end up killing beam when less than n_best hypotheses are finalized. This will raise an error here and here since predScore[b] is in fact not always of the n_best size.

Thank you for reporting this! As has been mentioned in the paper, this code is adapted from open-nmt (with some code remnants for beam search) but we don't report beam search results. And the issues you report only appear when you try to do beam search and print multiple-hypothesis the code for which can be buggy as you pointed out. I intend to work on beam search and fix this in the future. For now I recommend that you use n_best=1 for correct behavior.