def plot_attention(self, sentence):
    sentence_tensor = self.text2phone.string_to_tensor(sentence).squeeze(0).long().to(torch.device(self.device))
    att = self.phone2mel(text=sentence_tensor, speaker_embedding=self.speaker_embedding, return_atts=True)
    (fig, axes) = plt.subplots(nrows=1, ncols=1)
    axes.imshow(att.detach().numpy(), interpolation='nearest', aspect='auto', origin='lower')
    axes.set_title('{}'.format(sentence))
    axes.xaxis.set_visible(False)
    axes.yaxis.set_visible(False)
    plt.tight_layout()
    plt.show()
def plot_attention(self, sentence):
    sentence_tensor = self.text2phone.string_to_tensor(sentence).squeeze(0).long().to(torch.device(self.device))
    att = self.phone2mel(text=sentence_tensor, speaker_embedding=self.speaker_embedding, return_atts=True)
    (fig, axes) = plt.subplots(nrows=1, ncols=1)
    axes.imshow(att.detach().numpy(), interpolation='nearest', aspect='auto', origin='lower')
    axes.set_title('{}'.format(sentence))
    axes.xaxis.set_visible(False)
    axes.yaxis.set_visible(False)
    plt.tight_layout()
    plt.show()