class_docstr: This implements the mixup data augmentation in the paper
  "mixup: Beyond Empirical Risk Minimization" (https://arxiv.org/abs/1710.09412)
class_docstr_tok: ["This","implements","the","mixup","data","augmentation","in","the","paper","''","mixup",":","Beyond","Empirical","Risk","Minimization","''","(","https",":","\/\/arxiv.org\/abs\/1710.09412",")"]
docstr: Args:
      alpha: the hyperparameter of Beta distribution used to sample mixup
      coefficient.
      num_classes: number of classes in the dataset.
docstr_tok: ["Args",":","alpha",":","the","hyperparameter","of","Beta","distribution","used","to","sample","mixup","coefficient",".","num_classes",":","number","of","classes","in","the","dataset","."]
code: def __init__(self, alpha: float, num_classes: Optional[int] = None):
      """
      Args:
          alpha: the hyperparameter of Beta distribution used to sample mixup
          coefficient.
          num_classes: number of classes in the dataset.
      """
      self.alpha = alpha
      self.num_classes = num_classes
  
imports: import collections.abc
  from typing import Any, Dict, Optional
  import numpy
  import torch
  from classy_vision.generic.util import convert_to_one_hot
  from torch.distributions.beta import Beta
  from vissl.data.collators import register_collator
  from .moco_collator import moco_collator
  from .simclr_collator import simclr_collator
label_desc: Use image node_id 1 to create a new MixupTransform object  with example: obj = MixupTransform(alpha, num_classes)