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: The input is a batch of samples and their corresponding labels.
  
  Args:
      x (torch.Tensor): Input tensor. The input should be a batch of videos with
          shape (B, C, T, H, W).
      labels (torch.Tensor): Labels for input with shape (B).
docstr_tok: ["The","input","is","a","batch","of","samples","and","their","corresponding","labels",".","Args",":","x","(","torch.Tensor",")",":","Input","tensor",".","The","input","should","be","a","batch","of","videos","with","shape","(","B",",","C",",","T",",","H",",","W",")",".","labels","(","torch.Tensor",")",":","Labels","for","input","with","shape","(","B",")","."]
code: def forward(
      self,
      x_video: torch.Tensor,
      labels: torch.Tensor,
      **args: Any,
  ) -> Dict[str, Any]:
      """
      The input is a batch of samples and their corresponding labels.
  
      Args:
          x (torch.Tensor): Input tensor. The input should be a batch of videos with
              shape (B, C, T, H, W).
          labels (torch.Tensor): Labels for input with shape (B).
      """
      if args.get("x_audio", None) is None:
          if torch.rand(1).item() < self.cutmix_prob:
              x_video, new_labels = self.cutmix(x_video, labels)
          else:
              x_video, new_labels = self.mixup(x_video, labels)
          return x_video, new_labels
      else:
          x_audio = args["x_audio"]
          if torch.rand(1).item() < self.cutmix_prob:
              x_video, new_labels, x_audio = self.cutmix(
                  x_video, labels, x_audio
              )
          else:
              x_video, new_labels, x_audio = self.mixup(
                  x_video, labels, x_audio
              )
          return x_video, x_audio, new_labels
  
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 2 for calling the MixVideo obj's underlying member method code with example usage: obj.forward(x_video, labels) and returns: x_video,  new_labels, x_video,  x_audio,  new_labels