:py:mod:`ggt.metrics` ===================== .. py:module:: ggt.metrics Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 elementwise_mae/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: ggt.metrics.ElementwiseMae .. py:class:: ElementwiseMae(output_transform: Callable = lambda x: x, device: Optional[Union[str, torch.device]] = None) Bases: :py:obj:`ignite.metrics.Metric` Calculates the element-wise mean absolute error. .. py:method:: reset() -> None Resets the metric to it's initial state. By default, this is called at the start of each epoch. .. py:method:: update(output: Sequence[torch.Tensor]) -> None Updates the metric's state using the passed batch output. By default, this is called once for each batch. Args: output: the is the output from the engine's process function. .. py:method:: compute() -> Union[float, torch.Tensor] Computes the metric based on it's accumulated state. By default, this is called at the end of each epoch. Returns: Any: | the actual quantity of interest. However, if a :class:`~collections.abc.Mapping` is returned, it will be (shallow) flattened into `engine.state.metrics` when :func:`~ignite.metrics.Metric.completed` is called. Raises: NotComputableError: raised when the metric cannot be computed.