class_docstr: Get parameters for ``shear`` for a random shear transform.
  
  Args:
      shear: Range of degrees to select from.
          If float, a shear parallel to the x axis in the range (-shear, +shear) will be applied.
          If (a, b), a shear parallel to the x axis in the range (-shear, +shear) will be applied.
          If (a, b, c, d), then x-axis shear in (shear[0], shear[1]) and y-axis shear in (shear[2], shear[3])
          will be applied. Will not apply shear by default.
          If tensor, shear is a 2x2 tensor, a x-axis shear in (shear[0][0], shear[0][1]) and y-axis shear in
          (shear[1][0], shear[1][1]) will be applied. Will not apply shear by default.
  
  Returns:
      A dict of parameters to be passed for transformation.
          - shear_x (Tensor): element-wise x-axis shears with a shape of (B,).
          - shear_y (Tensor): element-wise y-axis shears 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: ["Get","parameters","for","``","shear","``","for","a","random","shear","transform",".","Args",":","shear",":","Range","of","degrees","to","select","from",".","If","float",",","a","shear","parallel","to","the","x","axis","in","the","range","(","-shear",",","+shear",")","will","be","applied",".","If","(","a",",","b",")",",","a","shear","parallel","to","the","x","axis","in","the","range","(","-shear",",","+shear",")","will","be","applied",".","If","(","a",",","b",",","c",",","d",")",",","then","x-axis","shear","in","(","shear","[","0","]",",","shear","[","1","]",")","and","y-axis","shear","in","(","shear","[","2","]",",","shear","[","3","]",")","will","be","applied",".","Will","not","apply","shear","by","default",".","If","tensor",",","shear","is","a","2x2","tensor",",","a","x-axis","shear","in","(","shear","[","0","]","[","0","]",",","shear","[","0","]","[","1","]",")","and","y-axis","shear","in","(","shear","[","1","]","[","0","]",",","shear","[","1","]","[","1","]",")","will","be","applied",".","Will","not","apply","shear","by","default",".","Returns",":","A","dict","of","parameters","to","be","passed","for","transformation",".","-","shear_x","(","Tensor",")",":","element-wise","x-axis","shears","with","a","shape","of","(","B",",",")",".","-","shear_y","(","Tensor",")",":","element-wise","y-axis","shears","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,
      shear: Union[
          Tensor,
          float,
          Tuple[float, float],
          Tuple[float, float, float, float],
      ],
  ) -> None:
      super().__init__()
      self.shear = shear
  
file_path: kornia/kornia/augmentation/random_generator/_2d/shear.py
imports: from typing import Dict, Tuple, Union
  import torch
  from kornia.augmentation.random_generator.base import RandomGeneratorBase, UniformDistribution
  from kornia.augmentation.utils import _adapted_rsampling, _common_param_check, _joint_range_check, _range_bound
  from kornia.core import Tensor, as_tensor, stack, tensor
  from kornia.utils.helpers import _extract_device_dtype
label_desc: Use image node_id 1 to create a new ShearGenerator object from inherited base classes: RandomGeneratorBase with example: obj = ShearGenerator(shear)