Calculate RMSE between two float arrays
| 31 | |
| 32 | // Calculate RMSE between two float arrays |
| 33 | static float array_rmse(const float * a1, const float * a2, size_t n) { |
| 34 | double sum = 0; |
| 35 | for (size_t i = 0; i < n; i++) { |
| 36 | double diff = a1[i] - a2[i]; |
| 37 | sum += diff * diff; |
| 38 | } |
| 39 | return sqrtf(sum) / n; |
| 40 | } |
| 41 | |
| 42 | // Total quantization error on test data |
| 43 | static float total_quantization_error(ggml_type_traits_t & qfns, size_t test_size, const float * test_data) { |
no outgoing calls
no test coverage detected