class_docstr: Mixup/Cutmix that applies different params to each element or whole batch
  
  Args:
      mixup_alpha (float): mixup alpha value, mixup is active if > 0.
      cutmix_alpha (float): cutmix alpha value, cutmix is active if > 0.
      cutmix_minmax (List[float]): cutmix min/max image ratio, cutmix is active and uses this vs alpha if not None.
      prob (float): probability of applying mixup or cutmix per batch or element
      switch_prob (float): probability of switching to cutmix instead of mixup when both are active
      mode (str): how to apply mixup/cutmix params (per 'batch', 'pair' (pair of elements), 'elem' (element)
      correct_lam (bool): apply lambda correction when cutmix bbox clipped by image borders
      label_smoothing (float): apply label smoothing to the mixed target tensor
      num_classes (int): number of classes for target
class_docstr_tok: ["Mixup\/Cutmix","that","applies","different","params","to","each","element","or","whole","batch","Args",":","mixup_alpha","(","float",")",":","mixup","alpha","value",",","mixup","is","active","if",">","0.","cutmix_alpha","(","float",")",":","cutmix","alpha","value",",","cutmix","is","active","if",">","0.","cutmix_minmax","(","List","[","float","]",")",":","cutmix","min\/max","image","ratio",",","cutmix","is","active","and","uses","this","vs","alpha","if","not","None",".","prob","(","float",")",":","probability","of","applying","mixup","or","cutmix","per","batch","or","element","switch_prob","(","float",")",":","probability","of","switching","to","cutmix","instead","of","mixup","when","both","are","active","mode","(","str",")",":","how","to","apply","mixup\/cutmix","params","(","per","'batch","'",",","'pair","'","(","pair","of","elements",")",",","'elem","'","(","element",")","correct_lam","(","bool",")",":","apply","lambda","correction","when","cutmix","bbox","clipped","by","image","borders","label_smoothing","(","float",")",":","apply","label","smoothing","to","the","mixed","target","tensor","num_classes","(","int",")",":","number","of","classes","for","target"]
code: def __init__(
      self,
      mixup_alpha=1.0,
      cutmix_alpha=0.0,
      cutmix_minmax=None,
      prob=1.0,
      switch_prob=0.5,
      mode="batch",
      correct_lam=True,
      label_smoothing=0.1,
      num_classes=1000,
  ):
      self.mixup_alpha = mixup_alpha
      self.cutmix_alpha = cutmix_alpha
      self.cutmix_minmax = cutmix_minmax
      if self.cutmix_minmax is not None:
          assert len(self.cutmix_minmax) == 2
          # force cutmix alpha == 1.0 when minmax active to keep logic simple & safe
          self.cutmix_alpha = 1.0
      self.mix_prob = prob
      self.switch_prob = switch_prob
      self.label_smoothing = label_smoothing
      self.num_classes = num_classes
      self.mode = mode
      self.correct_lam = (
          correct_lam  # correct lambda based on clipped area for cutmix
      )
      self.mixup_enabled = True
  
imports: import numpy
  import torch
label_desc: Use image node_id 1 to create a new Mixup object  with example: obj = Mixup(mixup_alpha, cutmix_alpha, cutmix_minmax, prob, switch_prob, mode, correct_lam, label_smoothing, num_classes)