Stop test time model with stop_token

This commit is contained in:
Eren Golge 2018-05-13 06:31:59 -07:00
parent dc3f909ddc
commit cac7e9ca5b
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ class Decoder(nn.Module):
if t >= T_decoder:
break
else:
if t > 1 and is_end_of_frames(output.view(self.r, -1), alignment, self.eps):
if t > 1 and stop_token > 0.5:
break
elif t > self.max_decoder_steps:
print(" !! Decoder stopped with 'max_decoder_steps'. \