tacotron2 stop condition

pull/10/head
root 2020-02-03 15:29:44 +01:00
parent 542141c978
commit 9feec72d44
1 changed files with 1 additions and 1 deletions

View File

@ -290,7 +290,7 @@ class Decoder(nn.Module):
stop_tokens += [stop_token]
alignments += [alignment]
if stop_token > 0.7:
if stop_token > 0.7 and t > inputs.shape[0] / 2:
break
if len(outputs) == self.max_decoder_steps:
print(" | > Decoder stopped with 'max_decoder_steps")