transformer-tensorflow icon indicating copy to clipboard operation
transformer-tensorflow copied to clipboard

Stop prediction when EOS is reached

Open surenreddy opened this issue 7 years ago • 0 comments

Hi Dongjun, In line 38, of the Graph class, the following loop continues until max sequence length is decoded.
for i in range(2, Config.data.max_seq_length):

Is it possible to break the loop when EOS(end of the sequence) is reached for the batch?

Thank you, Surendra

surenreddy avatar May 01 '18 12:05 surenreddy