class_docstr: Model for enhancement based on Wide ResNet.
  
  Full model description at: https://arxiv.org/pdf/2112.06068.pdf
  
  Arguments
  ---------
  n_fft : int
      Number of points in the fourier transform, see ``speechbrain.processing.features.STFT``
  win_length : int
      Length of stft window in ms, see ``speechbrain.processing.features.STFT``
  hop_length : int
      Time between windows in ms, see ``speechbrain.processing.features.STFT``
  sample_rate : int
      Number of samples per second of input audio.
  channel_counts : list of ints
      Number of output channels in each CNN block. Determines number of blocks.
  dense_count : int
      Number of dense layers.
  dense_nodes : int
      Number of nodes in the dense layers.
  activation : function
      Function to apply before convolution layers.
  normalization : class
      Name of class to use for constructing norm layers.
  dropout : float
      Portion of layer outputs to drop during training (between 0 and 1).
  mask_weight : float
      Amount of weight to give mask. 0 - no masking, 1 - full masking.
  
  Example
  -------
  >>> inputs = torch.rand([10, 16000])
  >>> model = EnhanceResnet()
  >>> outputs, feats = model(inputs)
  >>> outputs.shape
  torch.Size([10, 15872])
  >>> feats.shape
  torch.Size([10, 63, 257])
code: def __init__(
      self,
      n_fft=512,
      win_length=32,
      hop_length=16,
      sample_rate=16000,
      channel_counts=[128, 128, 256, 256, 512, 512],
      dense_count=2,
      dense_nodes=1024,
      activation=torch.nn.GELU(),
      normalization=sb.nnet.normalization.BatchNorm2d,
      dropout=0.1,
      mask_weight=0.99,
  ):
      super().__init__()
  
      self.mask_weight = mask_weight
  
      # First, convert time-domain to log spectral magnitude inputs
      self.stft = STFT(
          n_fft=n_fft,
          win_length=win_length,
          hop_length=hop_length,
          sample_rate=sample_rate,
      )
  
      # CNN takes log spectral mag inputs
      self.CNN = sb.nnet.containers.Sequential(
          input_shape=[None, None, n_fft // 2 + 1]
      )
      for channel_count in channel_counts:
          self.CNN.append(
              ConvBlock,
              channels=channel_count,
              activation=activation,
              normalization=normalization,
              dropout=dropout,
          )
  
      # Fully connected layers
      self.DNN = sb.nnet.containers.Sequential(
          input_shape=self.CNN.get_output_shape()
      )
      for _ in range(dense_count):
          self.DNN.append(
              sb.nnet.linear.Linear,
              n_neurons=dense_nodes,
              combine_dims=True,
          )
          self.DNN.append(activation)
          self.DNN.append(sb.nnet.normalization.LayerNorm)
          self.DNN.append(torch.nn.Dropout(p=dropout))
  
      # Output layer produces real mask that is applied to complex inputs
      self.DNN.append(sb.nnet.linear.Linear, n_neurons=n_fft // 2 + 1)
  
      # Convert back to time domain
      self.istft = ISTFT(
          n_fft=n_fft,
          win_length=win_length,
          hop_length=hop_length,
          sample_rate=sample_rate,
      )
  
file_path: speechbrain/speechbrain/lobes/models/EnhanceResnet.py
imports: import torch
  import speechbrain
  from speechbrain.processing.features import STFT, ISTFT, spectral_magnitude
label_desc: Use image node_id 1 to create a new EnhanceResnet object from inherited base classes: torch.nn with example: obj = EnhanceResnet(n_fft, win_length, hop_length, sample_rate, channel_counts, dense_count, dense_nodes, activation, normalization, dropout, mask_weight)