class_docstr: This class implements 1D Gabor Convolutions from
  
  Neil Zeghidour, Olivier Teboul, F{'e}lix de Chaumont Quitry & Marco Tagliasacchi, "LEAF: A LEARNABLE FRONTEND
  FOR AUDIO CLASSIFICATION", in Proc. of ICLR 2021 (https://arxiv.org/abs/2101.08596)
  
  Arguments
  ---------
  out_channels : int
      It is the number of output channels.
  kernel_size: int
      Kernel size of the convolutional filters.
  stride : int
      Stride factor of the convolutional filters. When the stride factor > 1,
      a decimation in time is performed.
  padding : str
      (same, valid). If "valid", no padding is performed.
      If "same" and stride is 1, output shape is the same as the input shape.
  padding_mode : str
      This flag specifies the type of padding. See torch.nn documentation
      for more information.
  sample_rate : int,
      Sampling rate of the input signals. It is only used for sinc_conv.
  min_freq : float
      Lowest possible frequency (in Hz) for a filter
  max_freq : float
      Highest possible frequency (in Hz) for a filter
  n_fft: int
      number of FFT bins for initialization
  normalize_energy: bool
      whether to normalize energy at initialization. Default is False
  bias : bool
      If True, the additive bias b is adopted.
  sort_filters: bool
      whether to sort filters by center frequencies. Default is False
  use_legacy_complex: bool
      If False, torch.complex64 data type is used for gabor impulse responses
      If True, computation is performed on two real-valued tensors
  skip_transpose: bool
      If False, uses batch x time x channel convention of speechbrain.
      If True, uses batch x channel x time convention.
  
  Example
  -------
  >>> inp_tensor = torch.rand([10, 8000])
  >>> # 401 corresponds to a window of 25 ms at 16000 kHz
  >>> gabor_conv = GaborConv1d(
  ...     40, kernel_size=401, stride=1, in_channels=1
  ... )
  >>> #
  >>> out_tensor = gabor_conv(inp_tensor)
  >>> out_tensor.shape
  torch.Size([10, 8000, 40])
code: def _gabor_constraint(self, kernel_data):
      mu_lower = 0.0
      mu_upper = math.pi
      sigma_lower = (
          4
          * torch.sqrt(
              2.0
              * torch.log(torch.tensor(2.0, device=kernel_data.device))
          )
          / math.pi
      )
      sigma_upper = (
          self.kernel_size
          * torch.sqrt(
              2.0
              * torch.log(torch.tensor(2.0, device=kernel_data.device))
          )
          / math.pi
      )
      clipped_mu = torch.clamp(
          kernel_data[:, 0], mu_lower, mu_upper
      ).unsqueeze(1)
      clipped_sigma = torch.clamp(
          kernel_data[:, 1], sigma_lower, sigma_upper
      ).unsqueeze(1)
      return torch.cat([clipped_mu, clipped_sigma], dim=-1)
  
imports: import math
  import torch
  import logging
  import numpy
  import torch.nn
  import torch.nn.functional
  import torchaudio
  from typing import Tuple
  from speechbrain.processing.signal_processing import gabor_impulse_response, gabor_impulse_response_legacy_complex
label_desc: Use image node_id 3 for calling the GaborConv1d obj's underlying member method code with example usage: obj._gabor_constraint(kernel_data) and returns: torch