class_docstr: RandomJigsaw augmentation.
  
  .. image:: _static/img/RandomJigsaw.png
  
  Make Jigsaw puzzles for each image individually. To mix with different images in a
  batch, referring to :class:`kornia.augmentation.RandomMosic`.
  
  Args:
      grid: the Jigsaw puzzle grid. e.g. (2, 2) means
          each output will mix image patches in a 2x2 grid.
      ensure_perm: to ensure the nonidentical patch permutation generation against
          the original one.
      data_keys: the input type sequential for applying augmentations.
          Accepts "input", "image", "mask", "bbox", "bbox_xyxy", "bbox_xywh", "keypoints".
      p: probability of applying the transformation for the whole batch.
      same_on_batch: apply the same transformation across the batch.
      keepdim: whether to keep the output shape the same as input ``True`` or broadcast it
          to the batch form ``False``.
  
  Examples:
      >>> jigsaw = RandomJigsaw((4, 4))
      >>> input = torch.randn(8, 3, 256, 256)
      >>> out = jigsaw(input)
      >>> out.shape
      torch.Size([8, 3, 256, 256])
code: def __init__(
      self,
      grid: Tuple[int, int] = (4, 4),
      data_keys: List[Union[str, int, DataKey]] = [DataKey.INPUT],
      p: float = 0.5,
      same_on_batch: bool = False,
      keepdim: bool = False,
      ensure_perm: bool = True,
  ) -> None:
      super().__init__(
          p=p,
          p_batch=1.0,
          same_on_batch=same_on_batch,
          keepdim=keepdim,
          data_keys=data_keys,
      )
      self._param_generator = rg.JigsawGenerator(grid, ensure_perm)
      self.flags = {"grid": grid}
  
file_path: kornia/kornia/augmentation/_2d/mix/jigsaw.py
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from kornia.augmentation import random_generator
  from kornia.augmentation._2d.mix.base import MixAugmentationBaseV2
  from kornia.constants import DataKey
  from kornia.core import Tensor
label_desc: Use image node_id 1 to create a new RandomJigsaw object from inherited base classes: MixAugmentationBaseV2 with example: obj = RandomJigsaw(grid, data_keys, p, same_on_batch, keepdim, ensure_perm)