31 const float *target_data)
33 float result_value = 0.f;
35 for (uint32_t i = 0; i < flat_size; ++i)
37 const auto cur_val = calculated_data[i] - target_data[i];
38 result_value += cur_val * cur_val;
41 assert(flat_size != 0);
43 return result_value /
static_cast<float>(flat_size);