ggt.metrics.elementwise_mae

Module Contents

Classes

ElementwiseMae

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.

Raises:

NotComputableError: raised when the metric cannot be computed.