class_docstr: Metric estimator for enhancement training.
  
  Consists of:
   * four 2d conv layers
   * channel averaging
   * three linear layers
  
  Arguments
  ---------
  kernel_size : tuple
      The dimensions of the 2-d kernel used for convolution.
  base_channels : int
      Number of channels used in each conv layer.
  lin_dim1: int
      Dimensionality of the first linear layer.
  lin_dim2: int
      Dimensionality of the second linear layer.
  
  
  Example
  -------
  >>> inputs = torch.rand([1, 1, 100, 257])
  >>> model = MetricDiscriminator()
  >>> outputs = model(inputs)
  >>> outputs.shape
  torch.Size([1, 1])
class_docstr_tok: ["Metric","estimator","for","enhancement","training",".","Consists","of",":","*","four","2d","conv","layers","*","channel","averaging","*","three","linear","layers","Arguments","--","--","--","--","-","kernel_size",":","tuple","The","dimensions","of","the","2-d","kernel","used","for","convolution",".","base_channels",":","int","Number","of","channels","used","in","each","conv","layer",".","lin_dim1",":","int","Dimensionality","of","the","first","linear","layer",".","lin_dim2",":","int","Dimensionality","of","the","second","linear","layer",".","Example","--","--","--","-",">",">",">","inputs","=","torch.rand","(","[","1",",","1",",","100",",","257","]",")",">",">",">","model","=","MetricDiscriminator","(",")",">",">",">","outputs","=","model","(","inputs",")",">",">",">","outputs.shape","torch.Size","(","[","1",",","1","]",")"]
docstr: Processes the input tensor x and returns an output tensor.
docstr_tok: ["Processes","the","input","tensor","x","and","returns","an","output","tensor","."]
code: def forward(self, x):
      """Processes the input tensor x and returns an output tensor."""
      out = self.conv1(x)
      out = self.activation(out)
  
      out = self.conv2(out)
      out = self.activation(out)
  
      out = self.conv3(out)
      out = self.activation(out)
  
      out = self.conv4(out)
      out = self.activation(out)
  
      out = torch.mean(out, (2, 3))
  
      out = self.Linear1(out)
      out = self.activation(out)
  
      out = self.Linear2(out)
      out = self.activation(out)
  
      out = self.Linear3(out)
  
      return out
  
file_path: speechbrain/speechbrain/lobes/models/MetricGAN_U.py
imports: import torch
  import speechbrain
  from torch import nn
  from torch.nn.utils import spectral_norm
label_desc: Use image node_id 2 for calling the MetricDiscriminator obj's underlying member method code with example usage: obj.forward(x) and returns: out