nmt icon indicating copy to clipboard operation
nmt copied to clipboard

Beam Search Decoder outputs -1 as prediction (how is this possible?)

Open ghost opened this issue 8 years ago • 4 comments

ghost avatar Jan 28 '18 02:01 ghost

did you try using the FinalBeamSearchDecoderOutput instead of dynamic decode ? https://www.tensorflow.org/api_docs/python/tf/contrib/seq2seq/FinalBeamSearchDecoderOutput

Aashit-Sharma avatar Mar 15 '18 09:03 Aashit-Sharma

Is there any update on this? @nave01314 Did you figure out how to resolve the error? I'm running into the same issue...

classicCoder16 avatar May 01 '18 00:05 classicCoder16

Is there any update on this? @nave01314 Did you figure out how to resolve the error? I'm running into the same issue...

WenjieWWJ avatar May 10 '18 02:05 WenjieWWJ

It looks like dynamic_decode() pads the output with -1 outside of the valid length. The lengths are returned by dynamic_decode() as the third variable, so you can use that to mask the output or only use the valid parts of each decoded sequence.

tomhosking avatar Jun 12 '18 15:06 tomhosking