formatting with printf

This commit is contained in:
mike dupont 2023-11-27 09:56:23 -05:00
parent 3cd807d000
commit 164ae84edf

View file

@ -9490,16 +9490,9 @@ void find_n_most_common_values(const char * pname, const ggml_tensor* tensor, in
size_t j = 0; size_t j = 0;
while (it != values.end() ) { while (it != values.end() ) {
const int count = it->second; const int count = it->second;
//n_most_common[j++] =
j++; j++;
if (count >1) { if (count >1) {
printf("JSON: { \"name\": \"%s\", \"name2\": \"%s\", \"weight\" : \"%f\", \"pos\" : \"%d\", \"count\" : \"%d\"} \n", pname, tensor->name, it->first , j, count);
std::cout << "weight:"
<< pname << "\t"
<< tensor->name << "\t"
<< std::fixed << (int) j << "\t"
<< std::fixed << it->first << "\t"
<< std::fixed << (int)count << "\n";
} }
it++; it++;
} }