MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / array_rmse

Function array_rmse

external/ggml/tests/test-quantize-fns.cpp:42–49  ·  view source on GitHub ↗

Calculate RMSE between two float arrays

Source from the content-addressed store, hash-verified

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

Callers 2

total_quantization_errorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected