class_docstr: Zeroes out(cuts) random continuous horisontal or
  vertical segments of the spectrogram as described in
  SpecAugment (https://arxiv.org/abs/1904.08779).
  
  Utilizes a Numba CUDA kernel to perform inplace edit of the input without loops.
  Parallelize over freq and time axis, parallel threads over batch.
  Sequential over masks (adaptive in time).
  
  Args:
      freq_masks - how many frequency segments should be cut
      time_masks - how many time segments should be cut
      freq_width - maximum number of frequencies to be cut in one segment
      time_width - maximum number of time steps to be cut in one segment.
          Can be a positive integer or a float value in the range [0, 1].
          If positive integer value, defines maximum number of time steps
          to be cut in one segment.
          If a float value, defines maximum percentage of timesteps that
          are cut adaptively.
      rng: Ignored.
class_docstr_tok: ["Zeroes","out","(","cuts",")","random","continuous","horisontal","or","vertical","segments","of","the","spectrogram","as","described","in","SpecAugment","(","https",":","\/\/arxiv.org\/abs\/1904.08779",")",".","Utilizes","a","Numba","CUDA","kernel","to","perform","inplace","edit","of","the","input","without","loops",".","Parallelize","over","freq","and","time","axis",",","parallel","threads","over","batch",".","Sequential","over","masks","(","adaptive","in","time",")",".","Args",":","freq_masks","-","how","many","frequency","segments","should","be","cut","time_masks","-","how","many","time","segments","should","be","cut","freq_width","-","maximum","number","of","frequencies","to","be","cut","in","one","segment","time_width","-","maximum","number","of","time","steps","to","be","cut","in","one","segment",".","Can","be","a","positive","integer","or","a","float","value","in","the","range","[","0",",","1","]",".","If","positive","integer","value",",","defines","maximum","number","of","time","steps","to","be","cut","in","one","segment",".","If","a","float","value",",","defines","maximum","percentage","of","timesteps","that","are","cut","adaptively",".","rng",":","Ignored","."]
code: def __init__(
      self,
      freq_masks=0,
      time_masks=0,
      freq_width=10,
      time_width=0.1,
      rng=None,
      mask_value=0.0,
  ):
      super().__init__()
      # Message to mention that numba specaugment kernel will be available
      # if input device is CUDA and lengths are provided
      logging.debug("Numba SpecAugment kernel is available")
  
      self.freq_masks = freq_masks
      self.time_masks = time_masks
  
      self.freq_width = freq_width
      self.time_width = time_width
  
      self.mask_value = mask_value
  
      # Unused
      self.rng = rng
      if self.rng is not None:
          logging.warning(
              "`rng` was supplied to SpecAugmentNumba, but it is not used."
          )
  
      if isinstance(time_width, int):
          self.adaptive_temporal_width = False
      else:
          if time_width > 1.0 or time_width < 0.0:
              raise ValueError(
                  "If `time_width` is a float value, must be in range [0, 1]"
              )
  
          self.adaptive_temporal_width = True
  
file_path: NeMo/nemo/collections/asr/parts/numba/spec_augment/spec_aug_numba.py
imports: import torch
  import torch.nn
  from numba import cuda
  from nemo.core.classes import Typing, typecheck
  from nemo.core.neural_types import LengthsType, NeuralType, SpectrogramType
  from nemo.utils import logging
label_desc: Use image node_id 3 to create a new SpecAugmentNumba object from inherited base classes: nn, Typing with example: obj = SpecAugmentNumba(freq_masks, time_masks, freq_width, time_width, rng, mask_value)