small bug fixes

pull/10/head
Eren Golge 2019-05-14 13:53:26 +02:00
parent 2b60f9a731
commit bb2b705e01
2 changed files with 3 additions and 0 deletions

View File

@ -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]

View File

@ -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()