Calculate layer_sum only for legacy

This commit is contained in:
Ed Addario 2025-11-17 13:36:28 +00:00
parent 76566b83de
commit 1f3db496cc
No known key found for this signature in database
GPG Key ID: E7875815A3230993
1 changed files with 3 additions and 2 deletions

View File

@ -1455,12 +1455,13 @@ static bool show_statistics(const common_params & params) {
const float zd = (float)tstat.elements * tstat.zd_score;
if (ls.find(blk) != ls.end()) {
ls[blk].layer_sum += tstat.sum_values;
if (legacy) { ls[blk].layer_sum += tstat.sum_values; }
ls[blk].layer_zd += zd;
ls[blk].n += tstat.elements;
} else {
layer_stats temp_ls;
temp_ls.layer_sum = tstat.sum_values;
if (legacy) { temp_ls.layer_sum = tstat.sum_values; }
else { temp_ls.layer_sum = 0.0f; }
temp_ls.layer_zd = zd;
temp_ls.n = tstat.elements;
ls[blk] = temp_ls;