class_docstr: Stochastically applies either MixUp or CutMix to the input video.
class_docstr_tok: ["Stochastically","applies","either","MixUp","or","CutMix","to","the","input","video","."]
docstr: Args:
      cutmix_prob (float): Probability of using CutMix. MixUp will be used with
          probability 1 - cutmix_prob. If cutmix_prob is 0, then MixUp is always
          used. If cutmix_prob is 1, then CutMix is always used.
      mixup_alpha (float): MixUp alpha value.
      cutmix_alpha (float): CutMix alpha value.
      label_smoothing (float): Label smoothing value.
      num_classes (int): Number of total classes.
docstr_tok: ["Args",":","cutmix_prob","(","float",")",":","Probability","of","using","CutMix",".","MixUp","will","be","used","with","probability","1","-","cutmix_prob",".","If","cutmix_prob","is","0",",","then","MixUp","is","always","used",".","If","cutmix_prob","is","1",",","then","CutMix","is","always","used",".","mixup_alpha","(","float",")",":","MixUp","alpha","value",".","cutmix_alpha","(","float",")",":","CutMix","alpha","value",".","label_smoothing","(","float",")",":","Label","smoothing","value",".","num_classes","(","int",")",":","Number","of","total","classes","."]
code: def __init__(
      self,
      cutmix_prob: float = 0.5,
      mixup_alpha: float = 1.0,
      cutmix_alpha: float = 1.0,
      label_smoothing: float = 0.0,
      num_classes: int = 400,
      one_hot: bool = False,
  ):
      """
      Args:
          cutmix_prob (float): Probability of using CutMix. MixUp will be used with
              probability 1 - cutmix_prob. If cutmix_prob is 0, then MixUp is always
              used. If cutmix_prob is 1, then CutMix is always used.
          mixup_alpha (float): MixUp alpha value.
          cutmix_alpha (float): CutMix alpha value.
          label_smoothing (float): Label smoothing value.
          num_classes (int): Number of total classes.
      """
  
      assert (
          0.0 <= cutmix_prob <= 1.0
      ), "cutmix_prob should be between 0.0 and 1.0"
  
      super().__init__()
      self.cutmix_prob = cutmix_prob
      self.mixup = MixUp(
          alpha=mixup_alpha,
          label_smoothing=label_smoothing,
          num_classes=num_classes,
          one_hot=one_hot,
      )
      self.cutmix = CutMix(
          alpha=cutmix_alpha,
          label_smoothing=label_smoothing,
          num_classes=num_classes,
      )
  
file_path: pytorchvideo/pytorchvideo/transforms/mix.py
imports: from typing import Any, Dict, Tuple
  import torch
  from pytorchvideo.transforms.functional import convert_to_one_hot
label_desc: Use image node_id 1 to create a new MixVideo object from inherited base classes: torch.nn with example: obj = MixVideo(cutmix_prob, mixup_alpha, cutmix_alpha, label_smoothing, num_classes, one_hot)