Chnage stop condition

This commit is contained in:
Eren Golge 2019-03-07 11:44:17 +01:00
parent 5754116c19
commit 772c859dff
1 changed files with 1 additions and 1 deletions

View File

@ -355,7 +355,7 @@ class Decoder(nn.Module):
alignments += [alignment]
stop_flags[0] = stop_flags[0] or gate_output > 0.5
stop_flags[1] = stop_flags[1] or alignment[0, -3:].sum() > 0.5
stop_flags[1] = stop_flags[1] or alignment[0, -2:].sum() > 0.5
if all(stop_flags):
break
elif len(outputs) == self.max_decoder_steps: