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","]",")"]
code: def __init__(
      self,
      *args: Module,
      same_on_batch: Optional[bool] = None,
      keepdim: Optional[bool] = None,
      random_apply: Union[int, bool, Tuple[int, int]] = False,
      random_apply_weights: Optional[List[float]] = None,
      if_unsupported_ops: str = "raise",
  ) -> None:
      super().__init__(
          *args, same_on_batch=same_on_batch, keepdim=keepdim
      )
  
      self.random_apply = self._read_random_apply(
          random_apply, len(args)
      )
      if random_apply_weights is not None and len(
          random_apply_weights
      ) != len(self):
          raise ValueError(
              "The length of `random_apply_weights` must be as same as the number of operations."
              f"Got {len(random_apply_weights)} and {len(self)}."
          )
      self.random_apply_weights = as_tensor(
          random_apply_weights or torch.ones((len(self),))
      )
      self.if_unsupported_ops = if_unsupported_ops
  
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 1 to create a new ImageSequential object from inherited base classes: ImageSequentialBase with example: obj = ImageSequential()