class_docstr: Generate mixup indexes and lambdas for a batch of inputs.
  
  Args:
      lambda_val (torch.Tensor, optional): min-max strength for mixup images, ranged from [0., 1.].
          If None, it will be set to tensor([0., 1.]), which means no restrictions.
  
  Returns:
      A dict of parameters to be passed for transformation.
          - mix_pairs (torch.Tensor): element-wise probabilities with a shape of (B,).
          - mixup_lambdas (torch.Tensor): element-wise probabilities with a shape of (B,).
  
  Note:
      The generated random numbers are not reproducible across different devices and dtypes. By default,
      the parameters will be generated on CPU in float32. This can be changed by calling
      ``self.set_rng_device_and_dtype(device="cuda", dtype=torch.float64)``.
class_docstr_tok: ["Generate","mixup","indexes","and","lambdas","for","a","batch","of","inputs",".","Args",":","lambda_val","(","torch.Tensor",",","optional",")",":","min-max","strength","for","mixup","images",",","ranged","from","[","0.",",","1.","]",".","If","None",",","it","will","be","set","to","tensor","(","[","0.",",","1",".","]",")",",","which","means","no","restrictions",".","Returns",":","A","dict","of","parameters","to","be","passed","for","transformation",".","-","mix_pairs","(","torch.Tensor",")",":","element-wise","probabilities","with","a","shape","of","(","B",",",")",".","-","mixup_lambdas","(","torch.Tensor",")",":","element-wise","probabilities","with","a","shape","of","(","B",",",")",".","Note",":","The","generated","random","numbers","are","not","reproducible","across","different","devices","and","dtypes",".","By","default",",","the","parameters","will","be","generated","on","CPU","in","float32",".","This","can","be","changed","by","calling","``","self.set_rng_device_and_dtype","(","device=","''","cuda","''",",","dtype=torch.float64",")","``","."]
code: def __init__(
      self,
      lambda_val: Optional[
          Union[torch.Tensor, Tuple[float, float]]
      ] = None,
      p: float = 1.0,
  ) -> None:
      super().__init__()
      self.lambda_val = lambda_val
      self.p = p
  
file_path: kornia/kornia/augmentation/random_generator/_2d/mixup.py
imports: from typing import Dict, Optional, Tuple, Union
  import torch
  from torch.distributions import Bernoulli
  from kornia.augmentation.random_generator.base import RandomGeneratorBase, UniformDistribution
  from kornia.augmentation.utils import _adapted_rsampling, _adapted_sampling, _common_param_check, _joint_range_check
  from kornia.utils.helpers import _extract_device_dtype
label_desc: Use image node_id 1 to create a new MixupGenerator object from inherited base classes: RandomGeneratorBase with example: obj = MixupGenerator(lambda_val, p)