class_docstr: Computes the discrete cosine transform.
  
  This class is primarily used to compute MFCC features of an audio signal
  given a set of FBANK features as input.
  
  Arguments
  ---------
  input_size : int
      Expected size of the last dimension in the input.
  n_out : int
      Number of output coefficients.
  ortho_norm : bool
      Whether to use orthogonal norm.
  
  Example
  -------
  >>> import torch
  >>> inputs = torch.randn([10, 101, 40])
  >>> compute_mfccs = DCT(input_size=inputs.size(-1))
  >>> features = compute_mfccs(inputs)
  >>> features.shape
  torch.Size([10, 101, 20])
class_docstr_tok: ["Computes","the","discrete","cosine","transform",".","This","class","is","primarily","used","to","compute","MFCC","features","of","an","audio","signal","given","a","set","of","FBANK","features","as","input",".","Arguments","--","--","--","--","-","input_size",":","int","Expected","size","of","the","last","dimension","in","the","input",".","n_out",":","int","Number","of","output","coefficients",".","ortho_norm",":","bool","Whether","to","use","orthogonal","norm",".","Example","--","--","--","-",">",">",">","import","torch",">",">",">","inputs","=","torch.randn","(","[","10",",","101",",","40","]",")",">",">",">","compute_mfccs","=","DCT","(","input_size=inputs.size","(","-1",")",")",">",">",">","features","=","compute_mfccs","(","inputs",")",">",">",">","features.shape","torch.Size","(","[","10",",","101",",","20","]",")"]
docstr: Returns the DCT of the input tensor.
  
  Arguments
  ---------
  x : tensor
      A batch of tensors to transform, usually fbank features.
docstr_tok: ["Returns","the","DCT","of","the","input","tensor",".","Arguments","--","--","--","--","-","x",":","tensor","A","batch","of","tensors","to","transform",",","usually","fbank","features","."]
code: def forward(self, x):
      """Returns the DCT of the input tensor.
  
      Arguments
      ---------
      x : tensor
          A batch of tensors to transform, usually fbank features.
      """
      # Managing multi-channels case
      input_shape = x.shape
      if len(input_shape) == 4:
          x = x.reshape(x.shape[0] * x.shape[3], x.shape[1], x.shape[2])
  
      # apply the DCT transform
      dct = torch.matmul(x, self.dct_mat.to(x.device))
  
      # Reshape in the case of multi-channels
      if len(input_shape) == 4:
          dct = dct.reshape(
              input_shape[0], dct.shape[1], dct.shape[2], input_shape[3]
          )
  
      return dct
  
imports: import math
  import torch
  import logging
  from speechbrain.utils.checkpoints import mark_as_saver, mark_as_loader, mark_as_transfer, register_checkpoint_hooks
  from speechbrain.dataio.dataio import length_to_mask
label_desc: Use image node_id 2 for calling the DCT obj's underlying member method code with example usage: obj.forward(x) and returns: dct