update train_vocoder_gan.py for coqpit

This commit is contained in:
Eren Gölge
2021-05-11 11:29:18 +02:00
parent 6ee6a563bc
commit e6f45b9eb7
15 changed files with 7 additions and 6 deletions
@@ -0,0 +1,14 @@
import numpy as np
import torch
from TTS.vocoder.models.melgan_generator import MelganGenerator
def test_melgan_generator():
model = MelganGenerator()
print(model)
dummy_input = torch.rand((4, 80, 64))
output = model(dummy_input)
assert np.all(output.shape == (4, 1, 64 * 256))
output = model.inference(dummy_input)
assert np.all(output.shape == (4, 1, (64 + 4) * 256))