From bb2b705e01b0eeac80cfdeeb751864629dbd5671 Mon Sep 17 00:00:00 2001 From: Eren Golge Date: Tue, 14 May 2019 13:53:26 +0200 Subject: [PATCH] small bug fixes --- layers/tacotron2.py | 1 + utils/visual.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/layers/tacotron2.py b/layers/tacotron2.py index 1833b0eb..6bb08ce1 100644 --- a/layers/tacotron2.py +++ b/layers/tacotron2.py @@ -509,6 +509,7 @@ class Decoder(nn.Module): else: self._init_states(inputs, mask=None, keep_states=True) + self.attention_layer.init_win_idx() self.attention_layer.init_states(inputs) outputs, stop_tokens, alignments, t = [], [], [], 0 stop_flags = [False, False, False] diff --git a/utils/visual.py b/utils/visual.py index 2924b034..9fd7a790 100644 --- a/utils/visual.py +++ b/utils/visual.py @@ -46,6 +46,7 @@ def visualize(alignment, spectrogram_postnet, stop_tokens, text, hop_length, CON if CONFIG.use_phonemes: seq = phoneme_to_sequence(text, [CONFIG.text_cleaner], CONFIG.phoneme_language, CONFIG.enable_eos_bos_chars) text = sequence_to_phoneme(seq) + print(text) plt.yticks(range(len(text)), list(text)) plt.colorbar() @@ -73,3 +74,4 @@ def visualize(alignment, spectrogram_postnet, stop_tokens, text, hop_length, CON if output_path: print(output_path) fig.savefig(output_path) + plt.close()