class_docstr: `Compute Mean Absolute Error`_ (MAE).
  
  .. math:: \text{MAE} = \frac{1}{N}\sum_i^N | y_i - \hat{y_i} |
  
  Where :math:`y` is a tensor of target values, and :math:`\hat{y}` is a tensor of predictions.
  
  As input to ``forward`` and ``update`` the metric accepts the following input:
  
  - ``preds`` (:class:`~torch.Tensor`): Predictions from model
  - ``target`` (:class:`~torch.Tensor`): Ground truth values
  
  As output of ``forward`` and ``compute`` the metric returns the following output:
  
  - ``mean_absolute_error`` (:class:`~torch.Tensor`): A tensor with the mean absolute error over the state
  
  Args:
      kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.
  
  Example:
      >>> from torch import tensor
      >>> from torchmetrics.regression import MeanAbsoluteError
      >>> target = tensor([3.0, -0.5, 2.0, 7.0])
      >>> preds = tensor([2.5, 0.0, 2.0, 8.0])
      >>> mean_absolute_error = MeanAbsoluteError()
      >>> mean_absolute_error(preds, target)
      tensor(0.5000)
code: def __init__(
      self,
      **kwargs: Any,
  ) -> None:
      super().__init__(**kwargs)
  
      self.add_state(
          "sum_abs_error", default=tensor(0.0), dist_reduce_fx="sum"
      )
      self.add_state("total", default=tensor(0), dist_reduce_fx="sum")
  
file_path: torchmetrics/src/torchmetrics/regression/mae.py
imports: from typing import Any, Optional, Sequence, Union
  from torch import Tensor, tensor
  from torchmetrics.functional.regression.mae import _mean_absolute_error_compute, _mean_absolute_error_update
  from torchmetrics.metric import Metric
  from torchmetrics.utilities.imports import _MATPLOTLIB_AVAILABLE
  from torchmetrics.utilities.plot import _AX_TYPE, _PLOT_OUT_TYPE
label_desc: Use image node_id 1 to create a new MeanAbsoluteError object from inherited base classes: Metric with example: obj = MeanAbsoluteError()