#include <MAE.h>
|
static float | calculateValue (const uint32_t flat_size, const float *calculated_data, const float *target_data) |
|
Definition at line 31 of file MAE.h.
◆ calculateValue()
float MAE::calculateValue |
( |
const uint32_t |
flat_size, |
|
|
const float * |
calculated_data, |
|
|
const float * |
target_data |
|
) |
| |
|
static |
Definition at line 30 of file MAE.cpp.
32{
33 float result_value = 0.f;
34
35 for (uint32_t i = 0; i < flat_size; ++i)
36 {
37 result_value += std::fabs(calculated_data[i] - target_data[i]);
38 }
39
40 assert(flat_size != 0);
41
42 return result_value / static_cast<float>(flat_size);
43}
Referenced by onert_micro::core::train::OMTrainingHandler::evaluateMetric().
The documentation for this struct was generated from the following files:
- onert-micro/onert-micro/include/train/metrics/MAE.h
- onert-micro/onert-micro/src/train/metrics/MAE.cpp