correct counts on load
This commit is contained in:
parent
4ad3eb21bf
commit
fe21ef7920
1 changed files with 4 additions and 2 deletions
|
@ -343,8 +343,10 @@ bool IMatrixCollector::load_imatrix(const char * fname) {
|
|||
|
||||
// Recreate the state as expected by save_imatrix(), and corerct for weighted sum.
|
||||
for (int i = 0; i < nval; i++) {
|
||||
e.values[i] += tmp[i];
|
||||
e.counts[i] += ncall;
|
||||
if (tmp[i]) {
|
||||
e.values[i] += tmp[i];
|
||||
e.counts[i] += ncall;
|
||||
}
|
||||
}
|
||||
e.ncall += ncall;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue