class_docstr: Computes the average endpoint error (AEPE) between 2 flow maps.
  
  EPE is the endpoint error between two 2D vectors (e.g., optical flow).
  Given a h x w x 2 optical flow map, the AEPE is:
  
  .. math::
  
      \text{AEPE}=\frac{1}{hw}\sum_{i=1, j=1}^{h, w}\sqrt{(I_{i,j,1}-T_{i,j,1})^{2}+(I_{i,j,2}-T_{i,j,2})^{2}}
  
  Args:
      reduction : Specifies the reduction to apply to the
       output: ``'none'`` | ``'mean'`` | ``'sum'``. ``'none'``: no reduction will be applied,
       ``'mean'``: the sum of the output will be divided by the number of elements
       in the output, ``'sum'``: the output will be summed.
  
  Shape:
      - input: :math:`(*, 2)`.
      - target :math:`(*, 2)`.
      - output: :math:`(1)`.
  
  Examples:
      >>> input1 = torch.rand(1, 4, 5, 2)
      >>> input2 = torch.rand(1, 4, 5, 2)
      >>> epe = AEPE(reduction="mean")
      >>> epe = epe(input1, input2)
code: def __init__(self, reduction: str = "mean") -> None:
      super().__init__()
      self.reduction: str = reduction
  
file_path: kornia/kornia/metrics/endpoint_error.py
imports: import torch
  from torch import Tensor, nn
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR, KORNIA_CHECK_SHAPE
label_desc: Use image node_id 1 to create a new AEPE object from inherited base classes: nn with example: obj = AEPE(reduction)