class_docstr: Sequential for creating kornia image processing pipeline.
  
  Args:
      *args : a list of kornia augmentation and image operation modules.
      same_on_batch: apply the same transformation across the batch.
          If None, it will not overwrite the function-wise settings.
      keepdim: whether to keep the output shape the same as input (True) or broadcast it
          to the batch form (False). If None, it will not overwrite the function-wise settings.
      random_apply: randomly select a sublist (order agnostic) of args to
          apply transformation. The selection probability aligns to the ``random_apply_weights``.
          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 True, the whole list of args will be processed as a sequence in a random order.
          If False, the whole list of args will be processed as a sequence in original order.
      random_apply_weights: a list of selection weights for each operation. The length shall be as
          same as the number of operations. By default, operations are sampled uniformly.
  
  .. note::
      Transformation matrix returned only considers the transformation applied in ``kornia.augmentation`` module.
      Those transformations in ``kornia.geometry`` will not be taken into account.
  
  Examples:
      >>> _ = torch.manual_seed(77)
      >>> import kornia
      >>> input = torch.randn(2, 3, 5, 6)
      >>> aug_list = ImageSequential(
      ...     kornia.color.BgrToRgb(),
      ...     kornia.augmentation.ColorJiggle(0.1, 0.1, 0.1, 0.1, p=1.0),
      ...     kornia.filters.MedianBlur((3, 3)),
      ...     kornia.augmentation.RandomAffine(360, p=1.0),
      ...     kornia.enhance.Invert(),
      ...     kornia.augmentation.RandomMixUpV2(p=1.0),
      ...     same_on_batch=True,
      ...     random_apply=10,
      ... )
      >>> out = aug_list(input)
      >>> out.shape
      torch.Size([2, 3, 5, 6])
  
      Reproduce with provided params.
      >>> out2 = aug_list(input, params=aug_list._params)
      >>> torch.equal(out, out2)
      True
  
  Perform ``OneOf`` transformation with ``random_apply=1`` and ``random_apply_weights`` in ``ImageSequential``.
  
      >>> import kornia
      >>> input = torch.randn(2, 3, 5, 6)
      >>> aug_list = ImageSequential(
      ...     kornia.color.BgrToRgb(),
      ...     kornia.augmentation.ColorJiggle(0.1, 0.1, 0.1, 0.1, p=1.0),
      ...     kornia.filters.MedianBlur((3, 3)),
      ...     kornia.augmentation.RandomAffine(360, p=1.0),
      ...     random_apply=1,
      ...     random_apply_weights=[0.5, 0.3, 0.2, 0.5]
      ... )
      >>> out= aug_list(input)
      >>> out.shape
      torch.Size([2, 3, 5, 6])
class_docstr_tok: ["Sequential","for","creating","kornia","image","processing","pipeline",".","Args",":","*","args",":","a","list","of","kornia","augmentation","and","image","operation","modules",".","same_on_batch",":","apply","the","same","transformation","across","the","batch",".","If","None",",","it","will","not","overwrite","the","function-wise","settings",".","keepdim",":","whether","to","keep","the","output","shape","the","same","as","input","(","True",")","or","broadcast","it","to","the","batch","form","(","False",")",".","If","None",",","it","will","not","overwrite","the","function-wise","settings",".","random_apply",":","randomly","select","a","sublist","(","order","agnostic",")","of","args","to","apply","transformation",".","The","selection","probability","aligns","to","the","``","random_apply_weights","``",".","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","True",",","the","whole","list","of","args","will","be","processed","as","a","sequence","in","a","random","order",".","If","False",",","the","whole","list","of","args","will","be","processed","as","a","sequence","in","original","order",".","random_apply_weights",":","a","list","of","selection","weights","for","each","operation",".","The","length","shall","be","as","same","as","the","number","of","operations",".","By","default",",","operations","are","sampled","uniformly",".","..","note",":",":","Transformation","matrix","returned","only","considers","the","transformation","applied","in","``","kornia.augmentation","``","module",".","Those","transformations","in","``","kornia.geometry","``","will","not","be","taken","into","account",".","Examples",":",">",">",">","_","=","torch.manual_seed","(","77",")",">",">",">","import","kornia",">",">",">","input","=","torch.randn","(","2",",","3",",","5",",","6",")",">",">",">","aug_list","=","ImageSequential","(","...","kornia.color.BgrToRgb","(",")",",","...","kornia.augmentation.ColorJiggle","(","0.1",",","0.1",",","0.1",",","0.1",",","p=1.0",")",",","...","kornia.filters.MedianBlur","(","(","3",",","3",")",")",",","...","kornia.augmentation.RandomAffine","(","360",",","p=1.0",")",",","...","kornia.enhance.Invert","(",")",",","...","kornia.augmentation.RandomMixUpV2","(","p=1.0",")",",","...","same_on_batch=True",",","...","random_apply=10",",","...",")",">",">",">","out","=","aug_list","(","input",")",">",">",">","out.shape","torch.Size","(","[","2",",","3",",","5",",","6","]",")","Reproduce","with","provided","params",".",">",">",">","out2","=","aug_list","(","input",",","params=aug_list._params",")",">",">",">","torch.equal","(","out",",","out2",")","True","Perform","``","OneOf","``","transformation","with","``","random_apply=1","``","and","``","random_apply_weights","``","in","``","ImageSequential","``",".",">",">",">","import","kornia",">",">",">","input","=","torch.randn","(","2",",","3",",","5",",","6",")",">",">",">","aug_list","=","ImageSequential","(","...","kornia.color.BgrToRgb","(",")",",","...","kornia.augmentation.ColorJiggle","(","0.1",",","0.1",",","0.1",",","0.1",",","p=1.0",")",",","...","kornia.filters.MedianBlur","(","(","3",",","3",")",")",",","...","kornia.augmentation.RandomAffine","(","360",",","p=1.0",")",",","...","random_apply=1",",","...","random_apply_weights=","[","0.5",",","0.3",",","0.2",",","0.5","]","...",")",">",">",">","out=","aug_list","(","input",")",">",">",">","out.shape","torch.Size","(","[","2",",","3",",","5",",","6","]",")"]
docstr: Compute the transformation matrix according to the provided parameters.
  
  Args:
      input: the input tensor.
      params: params for the sequence.
      recompute: if to recompute the transformation matrix according to the params.
          default: False.
docstr_tok: ["Compute","the","transformation","matrix","according","to","the","provided","parameters",".","Args",":","input",":","the","input","tensor",".","params",":","params","for","the","sequence",".","recompute",":","if","to","recompute","the","transformation","matrix","according","to","the","params",".","default",":","False","."]
code: def get_transformation_matrix(
      self,
      input: Tensor,
      params: Optional[List[ParamItem]] = None,
      recompute: bool = False,
      extra_args: Dict[str, Any] = {},
  ) -> Optional[Tensor]:
      """Compute the transformation matrix according to the provided parameters.
  
      Args:
          input: the input tensor.
          params: params for the sequence.
          recompute: if to recompute the transformation matrix according to the params.
              default: False.
      """
      if params is None:
          raise NotImplementedError("requires params to be provided.")
      named_modules: Iterator[
          Tuple[str, Module]
      ] = self.get_forward_sequence(params)
  
      # Define as 1 for broadcasting
      res_mat: Optional[Tensor] = None
      for (_, module), param in zip(
          named_modules, params if params is not None else []
      ):
          if isinstance(
              module, (K.GeometricAugmentationBase2D,)
          ) and isinstance(param.data, dict):
              ori_shape = input.shape
              try:
                  input = module.transform_tensor(input)
              except ValueError:
                  # Ignore error for 5-dim video
                  pass
              # Standardize shape
              if recompute:
                  flags = override_parameters(
                      module.flags, extra_args, in_place=False
                  )
                  mat = module.generate_transformation_matrix(
                      input, param.data, flags
                  )
              elif module._transform_matrix is not None:
                  mat = as_tensor(
                      module._transform_matrix,
                      device=input.device,
                      dtype=input.dtype,
                  )
              else:
                  raise RuntimeError(
                      f"{module}._transform_matrix is None while `recompute=False`."
                  )
              res_mat = mat if res_mat is None else mat @ res_mat
              input = module.transform_output_tensor(input, ori_shape)
              if module.keepdim and ori_shape != input.shape:
                  res_mat = res_mat.squeeze()
          elif isinstance(module, (ImageSequentialBase,)):
              # If not augmentationSequential
              if (
                  isinstance(module, (K.AugmentationSequential,))
                  and not recompute
              ):
                  mat = as_tensor(
                      module._transform_matrix,
                      device=input.device,
                      dtype=input.dtype,
                  )
              else:
                  maybe_param_data = cast(
                      Optional[List[ParamItem]], param.data
                  )
                  _mat = module.get_transformation_matrix(
                      input,
                      maybe_param_data,
                      recompute=recompute,
                      extra_args=extra_args,
                  )
                  mat = (
                      module.identity_matrix(input)
                      if _mat is None
                      else _mat
                  )
              res_mat = mat if res_mat is None else mat @ res_mat
      return res_mat
  
imports: from typing import Any, Dict, Iterator, List, Optional, Tuple, Union, cast
  import torch
  import kornia.augmentation
  from kornia.augmentation.base import _AugmentationBase
  from kornia.augmentation.utils import override_parameters
  from kornia.core import Module, Tensor, as_tensor
  from kornia.utils import eye_like
  from .base import ImageSequentialBase
  from .params import ParamItem
label_desc: Use image node_id 8 for calling the ImageSequential obj's underlying member method code with example usage: obj.get_transformation_matrix(input, params, recompute, extra_args) and returns: res_mat