docstr: Validate the output dimensions of a WaveRNN model's infer method.
docstr_tok: ["Validate","the","output","dimensions","of","a","WaveRNN","model","'s","infer","method","."]
code: def test_infer_waveform(self):
      """Validate the output dimensions of a WaveRNN model's infer method."""
  
      upsample_scales = [5, 5, 8]
      n_rnn = 128
      n_fc = 128
      n_classes = 128
      hop_length = 200
      n_batch = 2
      n_time = 50
      n_freq = 25
      n_output = 64
      n_res_block = 2
      n_hidden = 32
      kernel_size = 5
  
      model = WaveRNN(
          upsample_scales,
          n_classes,
          hop_length,
          n_res_block,
          n_rnn,
          n_fc,
          kernel_size,
          n_freq,
          n_hidden,
          n_output,
      )
  
      x = torch.rand(n_batch, n_freq, n_time)
      lengths = torch.tensor([n_time, n_time // 2])
      out, waveform_lengths = model.infer(x, lengths)
  
      assert out.size() == (n_batch, 1, hop_length * n_time)
      assert waveform_lengths[0] == hop_length * n_time
      assert waveform_lengths[1] == hop_length * n_time // 2
  
imports: import itertools
  from collections import namedtuple
  import torch
  from parameterized import parameterized
  from torchaudio.models import ConvTasNet, DeepSpeech, Wav2Letter, WaveRNN
  from torchaudio.models.wavernn import MelResNet, UpsampleNetwork
  from torchaudio_unittest import common_utils
  from torchaudio_unittest.common_utils import torch_script
label_desc: Use image node_id 2 for calling the TestWaveRNN obj's underlying member method code with example usage: obj.test_infer_waveform() without return types