From 9feec72d44a59fdaea7d5af0b66e97c762a56f7b Mon Sep 17 00:00:00 2001 From: root Date: Mon, 3 Feb 2020 15:29:44 +0100 Subject: [PATCH] tacotron2 stop condition --- layers/tacotron2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers/tacotron2.py b/layers/tacotron2.py index 78bdd10d..c195b277 100644 --- a/layers/tacotron2.py +++ b/layers/tacotron2.py @@ -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")