Merge pull request #2354 from gleb-sternharz:Branch_2.4.8
This commit is contained in:
commit
a6d64e254f
@ -706,7 +706,7 @@ struct KL_Divergence
|
|||||||
Iterator1 last = a + size;
|
Iterator1 last = a + size;
|
||||||
|
|
||||||
while (a < last) {
|
while (a < last) {
|
||||||
if (* a != 0) {
|
if (* b != 0) {
|
||||||
ResultType ratio = (ResultType)(*a / *b);
|
ResultType ratio = (ResultType)(*a / *b);
|
||||||
if (ratio>0) {
|
if (ratio>0) {
|
||||||
result += *a * log(ratio);
|
result += *a * log(ratio);
|
||||||
|
Loading…
Reference in New Issue
Block a user