class_docstr: VideoSequential for processing 5-dim video data like (B, T, C, H, W) and (B, C, T, H, W).
  
  `VideoSequential` is used to replace `nn.Sequential` for processing video data augmentations.
  By default, `VideoSequential` enabled `same_on_frame` to make sure the same augmentations happen
  across temporal dimension. Meanwhile, it will not affect other augmentation behaviours like the
  settings on `same_on_batch`, etc.
  
  Args:
      *args: a list of augmentation module.
      data_format: only BCTHW and BTCHW are supported.
      same_on_frame: apply the same transformation across the channel per frame.
      random_apply: randomly select a sublist (order agnostic) of args to
          apply transformation.
          If int, a fixed number of transformations will be selected.
          If (a,), x number of transformations (a <= x <= len(args)) will be selected.
          If (a, b), x number of transformations (a <= x <= b) will be selected.
          If None, the whole list of args will be processed as a sequence.
  
  Note:
      Transformation matrix returned only considers the transformation applied in ``kornia.augmentation`` module.
      Those transformations in ``kornia.geometry`` will not be taken into account.
  
  Example:
      If set `same_on_frame` to True, we would expect the same augmentation has been applied to each
      timeframe.
  
      >>> import kornia
      >>> input = torch.randn(2, 3, 1, 5, 6).repeat(1, 1, 4, 1, 1)
      >>> aug_list = VideoSequential(
      ...     kornia.augmentation.ColorJiggle(0.1, 0.1, 0.1, 0.1, p=1.0),
      ...     kornia.color.BgrToRgb(),
      ...     kornia.augmentation.RandomAffine(360, p=1.0),
      ...     random_apply=10,
      ...     data_format="BCTHW",
      ...     same_on_frame=True)
      >>> output = aug_list(input)
      >>> (output[0, :, 0] == output[0, :, 1]).all()
      tensor(True)
      >>> (output[0, :, 1] == output[0, :, 2]).all()
      tensor(True)
      >>> (output[0, :, 2] == output[0, :, 3]).all()
      tensor(True)
  
      If set `same_on_frame` to False:
  
      >>> aug_list = VideoSequential(
      ...     kornia.augmentation.ColorJiggle(0.1, 0.1, 0.1, 0.1, p=1.0),
      ...     kornia.augmentation.RandomAffine(360, p=1.0),
      ...     kornia.augmentation.RandomMixUpV2(p=1.0),
      ... data_format="BCTHW",
      ... same_on_frame=False)
      >>> output = aug_list(input)
      >>> output.shape
      torch.Size([2, 3, 4, 5, 6])
      >>> (output[0, :, 0] == output[0, :, 1]).all()
      tensor(False)
  
      Reproduce with provided params.
      >>> out2 = aug_list(input, params=aug_list._params)
      >>> torch.equal(output, out2)
      True
  
  Perform ``OneOf`` transformation with ``random_apply=1`` and ``random_apply_weights`` in ``VideoSequential``.
  
      >>> import kornia
      >>> input, label = torch.randn(2, 3, 1, 5, 6).repeat(1, 1, 4, 1, 1), torch.tensor([0, 1])
      >>> aug_list = VideoSequential(
      ...     kornia.augmentation.ColorJiggle(0.1, 0.1, 0.1, 0.1, p=1.0),
      ...     kornia.augmentation.RandomAffine(360, p=1.0),
      ...     kornia.augmentation.RandomMixUpV2(p=1.0),
      ... data_format="BCTHW",
      ... same_on_frame=False,
      ... random_apply=1,
      ... random_apply_weights=[0.5, 0.3, 0.8]
      ... )
      >>> out = aug_list(input)
      >>> out.shape
      torch.Size([2, 3, 4, 5, 6])
class_docstr_tok: ["VideoSequential","for","processing","5-dim","video","data","like","(","B",",","T",",","C",",","H",",","W",")","and","(","B",",","C",",","T",",","H",",","W",")",".","`","VideoSequential","`","is","used","to","replace","`","nn.Sequential","`","for","processing","video","data","augmentations",".","By","default",",","`","VideoSequential","`","enabled","`","same_on_frame","`","to","make","sure","the","same","augmentations","happen","across","temporal","dimension",".","Meanwhile",",","it","will","not","affect","other","augmentation","behaviours","like","the","settings","on","`","same_on_batch","`",",","etc",".","Args",":","*","args",":","a","list","of","augmentation","module",".","data_format",":","only","BCTHW","and","BTCHW","are","supported",".","same_on_frame",":","apply","the","same","transformation","across","the","channel","per","frame",".","random_apply",":","randomly","select","a","sublist","(","order","agnostic",")","of","args","to","apply","transformation",".","If","int",",","a","fixed","number","of","transformations","will","be","selected",".","If","(","a",",",")",",","x","number","of","transformations","(","a","<","=","x","<","=","len","(","args",")",")","will","be","selected",".","If","(","a",",","b",")",",","x","number","of","transformations","(","a","<","=","x","<","=","b",")","will","be","selected",".","If","None",",","the","whole","list","of","args","will","be","processed","as","a","sequence",".","Note",":","Transformation","matrix","returned","only","considers","the","transformation","applied","in","``","kornia.augmentation","``","module",".","Those","transformations","in","``","kornia.geometry","``","will","not","be","taken","into","account",".","Example",":","If","set","`","same_on_frame","`","to","True",",","we","would","expect","the","same","augmentation","has","been","applied","to","each","timeframe",".",">",">",">","import","kornia",">",">",">","input","=","torch.randn","(","2",",","3",",","1",",","5",",","6",")",".repeat","(","1",",","1",",","4",",","1",",","1",")",">",">",">","aug_list","=","VideoSequential","(","...","kornia.augmentation.ColorJiggle","(","0.1",",","0.1",",","0.1",",","0.1",",","p=1.0",")",",","...","kornia.color.BgrToRgb","(",")",",","...","kornia.augmentation.RandomAffine","(","360",",","p=1.0",")",",","...","random_apply=10",",","...","data_format=","''","BCTHW","''",",","...","same_on_frame=True",")",">",">",">","output","=","aug_list","(","input",")",">",">",">","(","output","[","0",",",":",",","0","]","==","output","[","0",",",":",",","1","]",")",".all","(",")","tensor","(","True",")",">",">",">","(","output","[","0",",",":",",","1","]","==","output","[","0",",",":",",","2","]",")",".all","(",")","tensor","(","True",")",">",">",">","(","output","[","0",",",":",",","2","]","==","output","[","0",",",":",",","3","]",")",".all","(",")","tensor","(","True",")","If","set","`","same_on_frame","`","to","False",":",">",">",">","aug_list","=","VideoSequential","(","...","kornia.augmentation.ColorJiggle","(","0.1",",","0.1",",","0.1",",","0.1",",","p=1.0",")",",","...","kornia.augmentation.RandomAffine","(","360",",","p=1.0",")",",","...","kornia.augmentation.RandomMixUpV2","(","p=1.0",")",",","...","data_format=","''","BCTHW","''",",","...","same_on_frame=False",")",">",">",">","output","=","aug_list","(","input",")",">",">",">","output.shape","torch.Size","(","[","2",",","3",",","4",",","5",",","6","]",")",">",">",">","(","output","[","0",",",":",",","0","]","==","output","[","0",",",":",",","1","]",")",".all","(",")","tensor","(","False",")","Reproduce","with","provided","params",".",">",">",">","out2","=","aug_list","(","input",",","params=aug_list._params",")",">",">",">","torch.equal","(","output",",","out2",")","True","Perform","``","OneOf","``","transformation","with","``","random_apply=1","``","and","``","random_apply_weights","``","in","``","VideoSequential","``",".",">",">",">","import","kornia",">",">",">","input",",","label","=","torch.randn","(","2",",","3",",","1",",","5",",","6",")",".repeat","(","1",",","1",",","4",",","1",",","1",")",",","torch.tensor","(","[","0",",","1","]",")",">",">",">","aug_list","=","VideoSequential","(","...","kornia.augmentation.ColorJiggle","(","0.1",",","0.1",",","0.1",",","0.1",",","p=1.0",")",",","...","kornia.augmentation.RandomAffine","(","360",",","p=1.0",")",",","...","kornia.augmentation.RandomMixUpV2","(","p=1.0",")",",","...","data_format=","''","BCTHW","''",",","...","same_on_frame=False",",","...","random_apply=1",",","...","random_apply_weights=","[","0.5",",","0.3",",","0.8","]","...",")",">",">",">","out","=","aug_list","(","input",")",">",">",">","out.shape","torch.Size","(","[","2",",","3",",","4",",","5",",","6","]",")"]
docstr: Transform bounding boxes.
  
  Args:
      input: tensor with shape :math:`(B, T, N, 2)`.
          If input is a `Keypoints` type, the internal shape is :math:`(B * T, N, 2)`.
docstr_tok: ["Transform","bounding","boxes",".","Args",":","input",":","tensor","with","shape",":","math",":","`","(","B",",","T",",","N",",","2",")","`",".","If","input","is","a","`","Keypoints","`","type",",","the","internal","shape","is",":","math",":","`","(","B","*","T",",","N",",","2",")","`","."]
code: def transform_keypoints(  # type: ignore[override]
      self,
      input: Union[Tensor, Keypoints],
      params: List[ParamItem],
      extra_args: Dict[str, Any] = {},
  ) -> Union[Tensor, Keypoints]:
      """Transform bounding boxes.
  
      Args:
          input: tensor with shape :math:`(B, T, N, 2)`.
              If input is a `Keypoints` type, the internal shape is :math:`(B * T, N, 2)`.
      """
      if isinstance(input, Tensor):
          batchsize, frame_num = input.size(0), input.size(1)
          input = Keypoints(
              input.view(-1, input.size(2), input.size(3))
          )
          input = super().transform_keypoints(
              input, params, extra_args=extra_args
          )
          input = input.data.view(batchsize, frame_num, -1, 2)
      else:
          input = super().transform_keypoints(
              input, params, extra_args=extra_args
          )
      return input
  
imports: from typing import Any, Dict, List, Optional, Tuple, Union, cast
  import torch
  import kornia.augmentation
  from kornia.augmentation.base import _AugmentationBase
  from kornia.augmentation.container.base import SequentialBase
  from kornia.augmentation.container.image import ImageSequential, _get_new_batch_shape
  from kornia.core import Module, Tensor
  from kornia.geometry.boxes import Boxes
  from kornia.geometry.keypoints import Keypoints
  from .params import ParamItem
label_desc: Use image node_id 13 for calling the VideoSequential obj's underlying member method code with example usage: obj.transform_keypoints(input, params, extra_args) and returns: input