Skip to content

Commit

Permalink
Remove unused vars in Delightful TTS layers tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Edresson committed Oct 23, 2023
1 parent ec7f547 commit e8a1a50
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/tts_tests2/test_delightful_tts_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

def test_acoustic_model():
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_lens = torch.tensor([207]).to(device)
dummy_pitch = torch.rand((1, 1, 207)).long().to(device)
Expand All @@ -38,6 +38,7 @@ def test_acoustic_model():
args.num_mels = 100

acoustic_model = AcousticModel(args=args, tokenizer=tokenizer, speaker_manager=None).to(device)
acoustic_model = acoustic_model.train()

output = acoustic_model(
tokens=dummy_tokens,
Expand All @@ -56,11 +57,7 @@ def test_acoustic_model():

def test_hifi_decoder():
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_pitch = torch.rand((1, 1, 207)).long().to(device)
dummy_energy = torch.rand((1, 1, 207)).long().to(device)

waveform_decoder = HifiganGenerator(
100,
Expand All @@ -77,6 +74,7 @@ def test_hifi_decoder():
conv_post_weight_norm=False,
conv_post_bias=False,
).to(device)
waveform_decoder = waveform_decoder.train()

vocoder_input_slices, slice_ids = rand_segments( # pylint: disable=unused-variable
x=dummy_input.transpose(1, 2),
Expand Down

0 comments on commit e8a1a50

Please sign in to comment.