You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This won't actually normalize the input distr as expected. The distr = is a new array. To achieve in-place, it should be distr /= summ.
The reason this calibrator still works is that in scipy's entropy function, scipy also performs normalization. But we better fix it here in case scipy changes its implementation.
The text was updated successfully, but these errors were encountered:
Description
In pytorch-quantization package, the _normalize_distr(distr) function in entropy calibrator is not right.
This won't actually normalize the input distr as expected. The
distr =
is a new array. To achieve in-place, it should bedistr /= summ
.The reason this calibrator still works is that in scipy's entropy function, scipy also performs normalization. But we better fix it here in case scipy changes its implementation.
The text was updated successfully, but these errors were encountered: