ggt.metrics.elementwise_mae
Module Contents
Classes
Calculates the element-wise mean absolute error. |
- class ggt.metrics.elementwise_mae.ElementwiseMae(output_transform: Callable = lambda x: ..., device: Optional[Union[str, torch.device]] = None)
Bases:
ignite.metrics.Metric
Calculates the element-wise mean absolute error.
- reset() None
Resets the metric to it’s initial state.
By default, this is called at the start of each epoch.
- 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.
- 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
Mapping
is returned, it will be (shallow) flattened into engine.state.metrics when
completed()
is called.
- Any: | the actual quantity of interest. However, if a
- Raises:
NotComputableError: raised when the metric cannot be computed.