ufal / neuralmonkey

An open-source tool for sequence learning in NLP built on TensorFlow.
BSD 3-Clause "New" or "Revised" License
410 stars 104 forks source link

model.sequence object feed dict cannot handle empty input batch #714

Open varisd opened 6 years ago

varisd commented 6 years ago

If Vocabulary returns a batch of empty sentences ('[[]]', '[[], []]', etc.), the list(zip(*vectors)) at https://github.com/ufal/neuralmonkey/blob/master/neuralmonkey/model/sequence.py#L213 reduces the dimension of the list which causes a ValueError (feeding a list of rank 1 to a rank 2 placeholder).

This bug is possibly relevant to other modules, where the list-zip idiom is used.

jindrahelcl commented 6 years ago

I think we came across this issue yesterday on another place as well..