mirror of https://github.com/coqui-ai/TTS.git
plot float16 alignments
This commit is contained in:
parent
13c6665c92
commit
e4680e1b99
TTS/tts/utils
|
@ -17,6 +17,8 @@ def plot_alignment(alignment,
|
||||||
alignment_ = alignment.detach().cpu().numpy().squeeze()
|
alignment_ = alignment.detach().cpu().numpy().squeeze()
|
||||||
else:
|
else:
|
||||||
alignment_ = alignment
|
alignment_ = alignment
|
||||||
|
alignment_ = alignment_.astype(
|
||||||
|
np.float32) if alignment_.dtype == np.float16 else alignment_
|
||||||
fig, ax = plt.subplots(figsize=fig_size)
|
fig, ax = plt.subplots(figsize=fig_size)
|
||||||
im = ax.imshow(alignment_.T,
|
im = ax.imshow(alignment_.T,
|
||||||
aspect='auto',
|
aspect='auto',
|
||||||
|
|
Loading…
Reference in New Issue