class_docstr: This function randomly swaps N channels.
  
  Arguments
  ---------
  min_swap : int
      The mininum number of channels to swap.
  max_swap : int
      The maximum number of channels to swap.
  
  Example
  -------
  >>> signal = torch.rand(4, 256, 8)
  >>> ch_swap = ChannelSwap()
  >>> output_signal = ch_swap(signal)
class_docstr_tok: ["This","function","randomly","swaps","N","channels",".","Arguments","--","--","--","--","-","min_swap",":","int","The","mininum","number","of","channels","to","swap",".","max_swap",":","int","The","maximum","number","of","channels","to","swap",".","Example","--","--","--","-",">",">",">","signal","=","torch.rand","(","4",",","256",",","8",")",">",">",">","ch_swap","=","ChannelSwap","(",")",">",">",">","output_signal","=","ch_swap","(","signal",")"]
code: def __init__(self, min_swap=0, max_swap=0):
      super().__init__()
      self.min_swap = min_swap
      self.max_swap = max_swap
  
      # Check arguments
      if self.min_swap < 0:
          raise ValueError("min_swap must be  >= 0.")
      if self.max_swap < 0:
          raise ValueError("max_swap must be  >= 0.")
      if self.max_swap < self.min_swap:
          raise ValueError("max_swap must be  >= min_swap")
  
imports: import math
  import random
  import torch
  import torch.nn.functional
  from speechbrain.dataio.legacy import ExtendedCSVDataset
  from speechbrain.dataio.dataloader import make_dataloader
  from speechbrain.processing.signal_processing import compute_amplitude, dB_to_amplitude, convolve1d, notch_filter, reverberate
label_desc: Use image node_id 1 to create a new ChannelSwap object from inherited base classes: torch.nn with example: obj = ChannelSwap(min_swap, max_swap)