| 202 | struct RMSE |
| 203 | { |
| 204 | double operator()(const float* a, const float* b, size_t count) const |
| 205 | { |
| 206 | double error = 0.0; |
| 207 | for (size_t i = 0; i < count; ++i) |
| 208 | error += sqr(a[i] - b[i]) / (sqr(a[i]) + 1e-3); |
| 209 | return error / count; |
| 210 | } |
| 211 | }; |
| 212 | |
| 213 | struct MAE |