mirror of https://github.com/coqui-ai/TTS.git
Remove unused vars in Delightful TTS layers tests
This commit is contained in:
parent
ec7f54768a
commit
e8a1a50273
|
@ -28,7 +28,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
|
|
||||||
def test_acoustic_model():
|
def test_acoustic_model():
|
||||||
dummy_tokens = torch.rand((1, 41)).long().to(device)
|
dummy_tokens = torch.rand((1, 41)).long().to(device)
|
||||||
dummy_text_lens = torch.tensor([41]).to(device)
|
dummy_text_lens = torch.tensor([41]).long().to(device)
|
||||||
dummy_spec = torch.rand((1, 100, 207)).to(device)
|
dummy_spec = torch.rand((1, 100, 207)).to(device)
|
||||||
dummy_spec_lens = torch.tensor([207]).to(device)
|
dummy_spec_lens = torch.tensor([207]).to(device)
|
||||||
dummy_pitch = torch.rand((1, 1, 207)).long().to(device)
|
dummy_pitch = torch.rand((1, 1, 207)).long().to(device)
|
||||||
|
@ -38,6 +38,7 @@ def test_acoustic_model():
|
||||||
args.num_mels = 100
|
args.num_mels = 100
|
||||||
|
|
||||||
acoustic_model = AcousticModel(args=args, tokenizer=tokenizer, speaker_manager=None).to(device)
|
acoustic_model = AcousticModel(args=args, tokenizer=tokenizer, speaker_manager=None).to(device)
|
||||||
|
acoustic_model = acoustic_model.train()
|
||||||
|
|
||||||
output = acoustic_model(
|
output = acoustic_model(
|
||||||
tokens=dummy_tokens,
|
tokens=dummy_tokens,
|
||||||
|
@ -56,11 +57,7 @@ def test_acoustic_model():
|
||||||
|
|
||||||
def test_hifi_decoder():
|
def test_hifi_decoder():
|
||||||
dummy_input = torch.rand((1, 207, 100)).to(device)
|
dummy_input = torch.rand((1, 207, 100)).to(device)
|
||||||
dummy_text_lens = torch.tensor([41]).to(device)
|
|
||||||
dummy_spec = torch.rand((1, 100, 207)).to(device)
|
|
||||||
dummy_spec_lens = torch.tensor([207]).to(device)
|
dummy_spec_lens = torch.tensor([207]).to(device)
|
||||||
dummy_pitch = torch.rand((1, 1, 207)).long().to(device)
|
|
||||||
dummy_energy = torch.rand((1, 1, 207)).long().to(device)
|
|
||||||
|
|
||||||
waveform_decoder = HifiganGenerator(
|
waveform_decoder = HifiganGenerator(
|
||||||
100,
|
100,
|
||||||
|
@ -77,6 +74,7 @@ def test_hifi_decoder():
|
||||||
conv_post_weight_norm=False,
|
conv_post_weight_norm=False,
|
||||||
conv_post_bias=False,
|
conv_post_bias=False,
|
||||||
).to(device)
|
).to(device)
|
||||||
|
waveform_decoder = waveform_decoder.train()
|
||||||
|
|
||||||
vocoder_input_slices, slice_ids = rand_segments( # pylint: disable=unused-variable
|
vocoder_input_slices, slice_ids = rand_segments( # pylint: disable=unused-variable
|
||||||
x=dummy_input.transpose(1, 2),
|
x=dummy_input.transpose(1, 2),
|
||||||
|
|
Loading…
Reference in New Issue