class_docstr: Module, which extracts patches using input images and local affine frames (LAFs).
  
  Then runs :class:`~kornia.feature.PatchDominantGradientOrientation` or
  :class:`~kornia.feature.OriNet` on patches and then rotates the LAFs by the estimated angles
  
  Args:
      patch_size:
      num_angular_bins:
      angle_detector: Patch orientation estimator, e.g. :class:`~kornia.feature.PatchDominantGradientOrientation`
        or OriNet.
class_docstr_tok: ["Module",",","which","extracts","patches","using","input","images","and","local","affine","frames","(","LAFs",")",".","Then","runs",":","class",":","`","~kornia.feature.PatchDominantGradientOrientation","`","or",":","class",":","`","~kornia.feature.OriNet","`","on","patches","and","then","rotates","the","LAFs","by","the","estimated","angles","Args",":","patch_size",":","num_angular_bins",":","angle_detector",":","Patch","orientation","estimator",",","e.g",".",":","class",":","`","~kornia.feature.PatchDominantGradientOrientation","`","or","OriNet","."]
code: def __init__(
      self,
      patch_size: int = 32,
      num_angular_bins: int = 36,
      angle_detector: Optional[nn.Module] = None,
  ) -> None:
      super().__init__()
      self.patch_size = patch_size
      self.num_ang_bins = num_angular_bins
      self.angle_detector: nn.Module
      if angle_detector is None:
          self.angle_detector = PatchDominantGradientOrientation(
              self.patch_size, self.num_ang_bins
          )
      else:
          self.angle_detector = angle_detector
  
imports: from typing import Dict, Optional
  import torch
  import torch.nn.functional
  from torch import nn
  from kornia.constants import pi
  from kornia.core.check import KORNIA_CHECK_LAF, KORNIA_CHECK_SHAPE
  from kornia.filters import SpatialGradient, get_gaussian_discrete_kernel1d, get_gaussian_kernel2d
  from kornia.geometry import rad2deg
  from kornia.utils.helpers import map_location_to_cpu
  from .laf import extract_patches_from_pyramid, get_laf_orientation, set_laf_orientation
label_desc: Use image node_id 1 to create a new LAFOrienter object from inherited base classes: nn with example: obj = LAFOrienter(patch_size, num_angular_bins, angle_detector)