class_docstr: Network, which estimates the canonical orientation of the given 32x32 patches, in radians.
  
  Zero angle points towards right. This is based on the original code from paper
  "Repeatability Is Not Enough: Learning Discriminative Affine Regions via Discriminability"".
  See :cite:`AffNet2018` for more details.
  
  Args:
      pretrained: Download and set pretrained weights to the model.
      eps: to avoid division by zero in atan2.
  
  Returns:
      Angle in radians.
  
  Shape:
      - Input: (B, 1, 32, 32)
      - Output: (B)
  
  Examples:
      >>> input = torch.rand(16, 1, 32, 32)
      >>> orinet = OriNet()
      >>> angle = orinet(input) # 16
class_docstr_tok: ["Network",",","which","estimates","the","canonical","orientation","of","the","given","32x32","patches",",","in","radians",".","Zero","angle","points","towards","right",".","This","is","based","on","the","original","code","from","paper","''","Repeatability","Is","Not","Enough",":","Learning","Discriminative","Affine","Regions","via","Discriminability","''","''",".","See",":","cite",":","`","AffNet2018","`","for","more","details",".","Args",":","pretrained",":","Download","and","set","pretrained","weights","to","the","model",".","eps",":","to","avoid","division","by","zero","in","atan2",".","Returns",":","Angle","in","radians",".","Shape",":","-","Input",":","(","B",",","1",",","32",",","32",")","-","Output",":","(","B",")","Examples",":",">",">",">","input","=","torch.rand","(","16",",","1",",","32",",","32",")",">",">",">","orinet","=","OriNet","(",")",">",">",">","angle","=","orinet","(","input",")","#","16"]
docstr: Args:
      patch: :math:`(B, 1, H, W)`
  
  Returns:
      angle in radians: :math:`(B)`
docstr_tok: ["Args",":","patch",":",":","math",":","`","(","B",",","1",",","H",",","W",")","`","Returns",":","angle","in","radians",":",":","math",":","`","(","B",")","`"]
code: def forward(self, patch: torch.Tensor) -> torch.Tensor:
      """
      Args:
          patch: :math:`(B, 1, H, W)`
  
      Returns:
          angle in radians: :math:`(B)`
      """
      xy = self.features(self._normalize_input(patch)).view(-1, 2)
      angle = torch.atan2(xy[:, 0] + 1e-8, xy[:, 1] + self.eps)
      return angle
  
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 3 for calling the OriNet obj's underlying member method code with example usage: obj.forward(patch) and returns: angle