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)
docstr: Update state with predictions and targets.
code: def update(self, preds: Tensor, target: Tensor) -> None:
      """Update state with predictions and targets."""
      sum_abs_error, num_obs = _mean_absolute_error_update(
          preds, target
      )
  
      self.sum_abs_error += sum_abs_error
      self.total += num_obs
  
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 2 for calling the MeanAbsoluteError obj's underlying member method code with example usage: obj.update(preds, target) without return types