MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / array_rmse

Function array_rmse

tests/test-quantize-fns.cpp:33–40  ·  view source on GitHub ↗

Calculate RMSE between two float arrays

Source from the content-addressed store, hash-verified

31
32// Calculate RMSE between two float arrays
33static 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
43static float total_quantization_error(ggml_type_traits_t & qfns, size_t test_size, const float * test_data) {

Callers 2

total_quantization_errorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected