Skip to contents

Computes the mean absolute error.

Usage

luz_metric_mae()

Value

Returns new luz metric.

Examples

if (torch::torch_is_installed()) {
library(torch)
metric <- luz_metric_mae()
metric <- metric$new()
metric$update(torch_randn(100), torch_randn(100))
metric$compute()
}
#> [1] 1.135496