From e4680e1b990ea8ca6539afbfeb7521e085d672a6 Mon Sep 17 00:00:00 2001 From: erogol Date: Mon, 28 Dec 2020 13:53:51 +0100 Subject: [PATCH] plot float16 alignments --- TTS/tts/utils/visual.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TTS/tts/utils/visual.py b/TTS/tts/utils/visual.py index 6eb3abdf..17cba648 100644 --- a/TTS/tts/utils/visual.py +++ b/TTS/tts/utils/visual.py @@ -17,6 +17,8 @@ def plot_alignment(alignment, alignment_ = alignment.detach().cpu().numpy().squeeze() else: alignment_ = alignment + alignment_ = alignment_.astype( + np.float32) if alignment_.dtype == np.float16 else alignment_ fig, ax = plt.subplots(figsize=fig_size) im = ax.imshow(alignment_.T, aspect='auto',