Use { and } around the conditionally-executed statement
Co-authored-by: compilade <git@compilade.net>
This commit is contained in:
parent
97d839c441
commit
d19e6c9afa
|
|
@ -223,7 +223,7 @@ static bool compute_vector_statistics(std::vector<tensor_statistics> & tstats, c
|
||||||
if (div > 0.0) {
|
if (div > 0.0) {
|
||||||
for (float w : weights) {
|
for (float w : weights) {
|
||||||
const float p = w / div;
|
const float p = w / div;
|
||||||
if (p > 0.0) entropy -= p * std::log2(p);
|
if (p > 0.0) { entropy -= p * std::log2(p); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue