Skip to content

Commit a32a2ec

Browse files
committed
Reformat report layout
1 parent 4c01f51 commit a32a2ec

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed

tools/imatrix/imatrix.cpp

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,25 +1219,23 @@ static bool show_statistics(const common_params & params) {
12191219
std::map<int, weighted_stats> ws;
12201220

12211221
LOG_INF("\nComputing statistics for %s (%d tensors)\n", params.in_files[0].c_str(), static_cast<int>(ts.size()));
1222-
LOG_INF(
1223-
"\n%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",
1224-
" Layer",
1225-
" Tensor",
1226-
tensor_calc_mode == 1 ? " L₂ Norm" : " Σ(Act²)",
1227-
" Min",
1228-
" Max",
1229-
" μ",
1230-
" σ",
1231-
" % Active",
1222+
LOG_INF("\n%6s\t%18s\t%13s\t%8s\t%8s\t%7s\t%15s\t%13s\t%12s\t%s\t%5s\t%10s\n",
1223+
"Layer",
1224+
"Tensor",
1225+
tensor_calc_mode == 1 ? "L₂ Norm" : "Σ(Act²)",
1226+
"Min",
1227+
"Max",
1228+
"μ",
1229+
"σ",
12321230
"N",
1233-
" Entropy",
1231+
"Entropy",
12341232
"E (norm)",
12351233
"ZD",
1236-
" CosSim"
1234+
"CosSim"
12371235
);
12381236
LOG_INF(
12391237
"=============================================================================================================="
1240-
"===========================================================\n");
1238+
"=============================================================\n");
12411239
for (const auto & tstat : ts) {
12421240
std::string layer, name;
12431241
process_tensor_name(tstat.tensor, layer, name);
@@ -1249,10 +1247,20 @@ static bool show_statistics(const common_params & params) {
12491247
blk = -1; // not a block layer
12501248
}
12511249

1252-
LOG_INF("%5s\t%-20s\t%10.2f\t%8.4f\t%11.4f\t%6.2f\t%6.2f\t%8.2f%%\t%6d\t%10.4f\t%6.2f%%\t%10.2f%%\t%8.4f\n",
1253-
layer.c_str(), name.c_str(), tstat.sum_values, tstat.min_values, tstat.max_values, tstat.mean_values,
1254-
tstat.stddev, tstat.active * 100.0f, tstat.elements, tstat.entropy,
1255-
100.0f * (tstat.entropy / std::log2(tstat.elements)), 100.0f * tstat.zd_score, tstat.cossim);
1250+
LOG_INF("%5s\t%-20s\t%11.2f\t%10.4f\t%10.4f\t%8.2f\t%8.2f\t%7d\t%12.4f\t%7.2f%%\t%6.2f%%\t%10.4f\n",
1251+
layer.c_str(),
1252+
name.c_str(),
1253+
tstat.sum_values,
1254+
tstat.min_values,
1255+
tstat.max_values,
1256+
tstat.mean_values,
1257+
tstat.stddev,
1258+
tstat.elements,
1259+
tstat.entropy,
1260+
100.0f * (tstat.entropy / std::log2(tstat.elements)),
1261+
100.0f * tstat.zd_score,
1262+
tstat.cossim
1263+
);
12561264

12571265
const float weighted_bias = tstat.elements * tstat.sum_values;
12581266
const float weighted_zd = tstat.elements * tstat.zd_score;

0 commit comments

Comments
 (0)