class_docstr: Apply mixup and/or cutmix for videos at batch level.
  mixup: Beyond Empirical Risk Minimization (https://arxiv.org/abs/1710.09412)
  CutMix: Regularization Strategy to Train Strong Classifiers with Localizable
      Features (https://arxiv.org/abs/1905.04899)
class_docstr_tok: ["Apply","mixup","and\/or","cutmix","for","videos","at","batch","level",".","mixup",":","Beyond","Empirical","Risk","Minimization","(","https",":","\/\/arxiv.org\/abs\/1710.09412",")","CutMix",":","Regularization","Strategy","to","Train","Strong","Classifiers","with","Localizable","Features","(","https",":","\/\/arxiv.org\/abs\/1905.04899",")"]
docstr: Args:
      mixup_alpha (float): Mixup alpha value.
      cutmix_alpha (float): Cutmix alpha value.
      mix_prob (float): Probability of applying mixup or cutmix.
      switch_prob (float): Probability of switching to cutmix instead of
          mixup when both are active.
      correct_lam (bool): Apply lambda correction when cutmix bbox
          clipped by image borders.
      label_smoothing (float): Apply label smoothing to the mixed target
          tensor. If label_smoothing is not used, set it to 0.
      num_classes (int): Number of classes for target.
docstr_tok: ["Args",":","mixup_alpha","(","float",")",":","Mixup","alpha","value",".","cutmix_alpha","(","float",")",":","Cutmix","alpha","value",".","mix_prob","(","float",")",":","Probability","of","applying","mixup","or","cutmix",".","switch_prob","(","float",")",":","Probability","of","switching","to","cutmix","instead","of","mixup","when","both","are","active",".","correct_lam","(","bool",")",":","Apply","lambda","correction","when","cutmix","bbox","clipped","by","image","borders",".","label_smoothing","(","float",")",":","Apply","label","smoothing","to","the","mixed","target","tensor",".","If","label_smoothing","is","not","used",",","set","it","to","0.","num_classes","(","int",")",":","Number","of","classes","for","target","."]
code: def __init__(
      self,
      mixup_alpha=1.0,
      cutmix_alpha=0.0,
      mix_prob=1.0,
      switch_prob=0.5,
      correct_lam=True,
      label_smoothing=0.1,
      num_classes=1000,
  ):
      """
      Args:
          mixup_alpha (float): Mixup alpha value.
          cutmix_alpha (float): Cutmix alpha value.
          mix_prob (float): Probability of applying mixup or cutmix.
          switch_prob (float): Probability of switching to cutmix instead of
              mixup when both are active.
          correct_lam (bool): Apply lambda correction when cutmix bbox
              clipped by image borders.
          label_smoothing (float): Apply label smoothing to the mixed target
              tensor. If label_smoothing is not used, set it to 0.
          num_classes (int): Number of classes for target.
      """
      self.mixup_alpha = mixup_alpha
      self.cutmix_alpha = cutmix_alpha
      self.mix_prob = mix_prob
      self.switch_prob = switch_prob
      self.label_smoothing = label_smoothing
      self.num_classes = num_classes
      self.correct_lam = correct_lam
  
file_path: SlowFast/slowfast/datasets/mixup.py
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, mix_prob, switch_prob, correct_lam, label_smoothing, num_classes)