Calculate RMSE between two float arrays
| 36 | |
| 37 | // Calculate RMSE between two float arrays |
| 38 | static float array_rmse(const float * a1, const float * a2, size_t n) { |
| 39 | double sum = 0; |
| 40 | for (size_t i = 0; i < n; i++) { |
| 41 | double diff = a1[i] - a2[i]; |
| 42 | sum += diff * diff; |
| 43 | } |
| 44 | return sqrtf(sum) / n; |
| 45 | } |
| 46 | |
| 47 | // Total quantization error on test data |
| 48 | static float total_quantization_error(const ggml_type_traits * qfns, const ggml_type_traits_cpu * qfns_cpu, size_t test_size, const float * test_data) { |
no outgoing calls
no test coverage detected