class_docstr: Module, which estimates the second moment matrix of the patch gradients.
  
  The method determines the affine shape of the local feature as in :cite:`baumberg2000`.
  
  Args:
      patch_size: the input image patch size.
      eps: for safe division.
code: def __init__(self, patch_size: int = 19, eps: float = 1e-10) -> None:
      super().__init__()
      self.patch_size: int = patch_size
      self.gradient: nn.Module = SpatialGradient("sobel", 1)
      self.eps: float = eps
      sigma: float = float(self.patch_size) / math.sqrt(2.0)
      self.weighting: torch.Tensor = get_gaussian_kernel2d(
          (self.patch_size, self.patch_size), (sigma, sigma), True
      )
  
imports: import math
  import warnings
  from typing import Dict, Optional
  import torch
  from torch import nn
  from kornia.core.check import KORNIA_CHECK_LAF, KORNIA_CHECK_SHAPE
  from kornia.filters.kernels import get_gaussian_kernel2d
  from kornia.filters.sobel import SpatialGradient
  from kornia.utils.helpers import map_location_to_cpu
  from .laf import ellipse_to_laf, extract_patches_from_pyramid, get_laf_orientation, get_laf_scale, make_upright, scale_laf, set_laf_orientation
label_desc: Use image node_id 1 to create a new PatchAffineShapeEstimator object from inherited base classes: nn with example: obj = PatchAffineShapeEstimator(patch_size, eps)