class_docstr: GeometricAugmentationBase2D base class for customized geometric augmentation implementations.
  
  Args:
      p: probability for applying an augmentation. This param controls the augmentation probabilities
        element-wise for a batch.
      p_batch: probability for applying an augmentation to a batch. This param controls the augmentation
        probabilities batch-wise.
      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``.
class_docstr_tok: ["GeometricAugmentationBase2D","base","class","for","customized","geometric","augmentation","implementations",".","Args",":","p",":","probability","for","applying","an","augmentation",".","This","param","controls","the","augmentation","probabilities","element-wise","for","a","batch",".","p_batch",":","probability","for","applying","an","augmentation","to","a","batch",".","This","param","controls","the","augmentation","probabilities","batch-wise",".","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","``","."]
docstr: Obtain transformation matrices.
  
  Return the current transformation matrix if existed. Generate a new one, otherwise.
docstr_tok: ["Obtain","transformation","matrices",".","Return","the","current","transformation","matrix","if","existed",".","Generate","a","new","one",",","otherwise","."]
code: def get_transformation_matrix(
      self,
      input: Tensor,
      params: Optional[Dict[str, Tensor]] = None,
      flags: Optional[Dict[str, Any]] = None,
  ) -> Tensor:
      """Obtain transformation matrices.
  
      Return the current transformation matrix if existed. Generate a new one, otherwise.
      """
      flags = self.flags if flags is None else flags
      if params is not None:
          transform = self.generate_transformation_matrix(
              input, params, flags
          )
      elif self.transform_matrix is None:
          params = self.forward_parameters(input.shape)
          transform = self.generate_transformation_matrix(
              input, params, flags
          )
      else:
          transform = self.transform_matrix
      return as_tensor(
          transform, device=input.device, dtype=input.dtype
      )
  
imports: from typing import Any, Dict, Optional, Tuple
  from kornia.augmentation._2d.base import RigidAffineAugmentationBase2D
  from kornia.constants import Resample
  from kornia.core import Tensor, as_tensor
  from kornia.geometry.boxes import Boxes
  from kornia.geometry.keypoints import Keypoints
  from kornia.utils.helpers import _torch_inverse_cast
label_desc: Use image node_id 3 for calling the GeometricAugmentationBase2D obj's underlying member method code with example usage: obj.get_transformation_matrix(input, params, flags) and returns: as_tensor