#include <MSE.h>
|
static float | calculateValue (const uint32_t flat_size, const float *calculated_data, const float *target_data) |
|
Definition at line 31 of file MSE.h.
◆ calculateValue()
float MSE::calculateValue |
( |
const uint32_t |
flat_size, |
|
|
const float * |
calculated_data, |
|
|
const float * |
target_data |
|
) |
| |
|
static |
Definition at line 30 of file MSE.cpp.
32{
33 float result_value = 0.f;
34
35 for (uint32_t i = 0; i < flat_size; ++i)
36 {
37 const auto cur_val = calculated_data[i] - target_data[i];
38 result_value += cur_val * cur_val;
39 }
40
41 assert(flat_size != 0);
42
43 return result_value / static_cast<float>(flat_size);
44}
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/MSE.h
- onert-micro/onert-micro/src/train/metrics/MSE.cpp