From e4db7c51b5ecc59fdb2c45ff0c81c6396ca356de Mon Sep 17 00:00:00 2001 From: manmay nakhashi Date: Mon, 15 Aug 2022 14:38:50 +0530 Subject: [PATCH] Update capacitron_layers.py (#1664) crashing because of dimension miss match at line no. 57 [batch, 256] vs [batch , 1, 512] enc_out = torch.cat([enc_out, speaker_embedding], dim=-1) --- TTS/tts/layers/tacotron/capacitron_layers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/TTS/tts/layers/tacotron/capacitron_layers.py b/TTS/tts/layers/tacotron/capacitron_layers.py index 56fe44bc..68321358 100644 --- a/TTS/tts/layers/tacotron/capacitron_layers.py +++ b/TTS/tts/layers/tacotron/capacitron_layers.py @@ -53,6 +53,7 @@ class CapacitronVAE(nn.Module): text_summary_out = self.text_summary_net(text_inputs, input_lengths).to(reference_mels.device) enc_out = torch.cat([enc_out, text_summary_out], dim=-1) if speaker_embedding is not None: + speaker_embedding = torch.squeeze(speaker_embedding) enc_out = torch.cat([enc_out, speaker_embedding], dim=-1) # Feed the output of the ref encoder and information about text/speaker into