Merge pull request #3393 from eighttails/fix_zero_division

Fix division by zero during CJK training.
This commit is contained in:
Egor Pugin 2021-04-11 15:38:28 +03:00 committed by GitHub
commit 423f00c351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,7 +162,7 @@ public:
vote += values_[i].vote;
}
return rc / vote;
return vote == 0 ? 0.0f : rc / vote;
}
private: