class_docstr: MelResNet layer uses a stack of ResBlocks on spectrogram.
  
  Args:
      n_res_block: the number of ResBlock in stack. (Default: ``10``)
      n_freq: the number of bins in a spectrogram. (Default: ``128``)
      n_hidden: the number of hidden dimensions of resblock. (Default: ``128``)
      n_output: the number of output dimensions of melresnet. (Default: ``128``)
      kernel_size: the number of kernel size in the first Conv1d layer. (Default: ``5``)
  
  Examples
      >>> melresnet = MelResNet()
      >>> input = torch.rand(10, 128, 512)  # a random spectrogram
      >>> output = melresnet(input)  # shape: (10, 128, 508)
class_docstr_tok: ["MelResNet","layer","uses","a","stack","of","ResBlocks","on","spectrogram",".","Args",":","n_res_block",":","the","number","of","ResBlock","in","stack",".","(","Default",":","``","10","``",")","n_freq",":","the","number","of","bins","in","a","spectrogram",".","(","Default",":","``","128","``",")","n_hidden",":","the","number","of","hidden","dimensions","of","resblock",".","(","Default",":","``","128","``",")","n_output",":","the","number","of","output","dimensions","of","melresnet",".","(","Default",":","``","128","``",")","kernel_size",":","the","number","of","kernel","size","in","the","first","Conv1d","layer",".","(","Default",":","``","5","``",")","Examples",">",">",">","melresnet","=","MelResNet","(",")",">",">",">","input","=","torch.rand","(","10",",","128",",","512",")","#","a","random","spectrogram",">",">",">","output","=","melresnet","(","input",")","#","shape",":","(","10",",","128",",","508",")"]
docstr: Pass the input through the MelResNet layer.
  Args:
      specgram (Tensor): the input sequence to the MelResNet layer (n_batch, n_freq, n_time).
  
  Return:
      Tensor shape: (n_batch, n_output, n_time - kernel_size + 1)
docstr_tok: ["Pass","the","input","through","the","MelResNet","layer",".","Args",":","specgram","(","Tensor",")",":","the","input","sequence","to","the","MelResNet","layer","(","n_batch",",","n_freq",",","n_time",")",".","Return",":","Tensor","shape",":","(","n_batch",",","n_output",",","n_time","-","kernel_size","+","1",")"]
code: def forward(self, specgram: Tensor) -> Tensor:
      r"""Pass the input through the MelResNet layer.
      Args:
          specgram (Tensor): the input sequence to the MelResNet layer (n_batch, n_freq, n_time).
  
      Return:
          Tensor shape: (n_batch, n_output, n_time - kernel_size + 1)
      """
  
      return self.melresnet_model(specgram)
  
imports: import math
  from typing import List, Optional, Tuple
  import torch
  import torch.nn.functional
  from torch import nn, Tensor
label_desc: Use image node_id 2 for calling the MelResNet obj's underlying member method code with example usage: obj.forward(specgram) and returns: self