mirror of
https://github.com/wassname/TTS.git
synced 2026-10-27 12:30:27 +08:00
bugfix on tacotron unit test
This commit is contained in:
1 parent
e3f56b613b
commit
d78f27ea41
1 file changed
+2
@@ -37,6 +37,7 @@ class TacotronTrainTest(unittest.TestCase):
|
||||
mel_spec = torch.rand(8, 30, c.audio["num_mels"]).to(device)
|
||||
linear_spec = torch.rand(8, 30, c.audio["fft_size"]).to(device)
|
||||
mel_lengths = torch.randint(20, 30, (8,)).long().to(device)
|
||||
mel_lengths[-1] = mel_spec.size(1)
|
||||
stop_targets = torch.zeros(8, 30, 1).float().to(device)
|
||||
speaker_ids = torch.randint(0, 5, (8,)).long().to(device)
|
||||
|
||||
@@ -96,6 +97,7 @@ class MultiSpeakeTacotronTrainTest(unittest.TestCase):
|
||||
mel_spec = torch.rand(8, 30, c.audio["num_mels"]).to(device)
|
||||
linear_spec = torch.rand(8, 30, c.audio["fft_size"]).to(device)
|
||||
mel_lengths = torch.randint(20, 30, (8,)).long().to(device)
|
||||
mel_lengths[-1] = mel_spec.size(1)
|
||||
stop_targets = torch.zeros(8, 30, 1).float().to(device)
|
||||
speaker_embeddings = torch.rand(8, 55).to(device)
|
||||
|
||||
|
||||
Reference in new issue
Block a user