mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
fix for 2 dim memory tensor
This commit is contained in:
+4
-1
@@ -183,7 +183,10 @@ class Decoder(nn.Module):
|
||||
return outputs, stop_tokens, alignments
|
||||
|
||||
def _update_memory(self, memory):
|
||||
return memory[:, :, self.mel_channels * (self.r - 1) :]
|
||||
if len(memory.shape) == 2:
|
||||
return memory[:, self.mel_channels * (self.r - 1) :]
|
||||
else:
|
||||
return memory[:, :, self.mel_channels * (self.r - 1) :]
|
||||
|
||||
def decode(self, memory):
|
||||
query_input = torch.cat((memory, self.context), -1)
|
||||
|
||||
Reference in New Issue
Block a user