[CPU] Correct crop in FQ optimized formula (#16887)
This commit is contained in:
parent
a7228534af
commit
e98bd0dae4
@ -1994,6 +1994,9 @@ void FakeQuantize::updateOptimizedFormula(bool do_rounding) {
|
||||
// merged with inputScale/inputShift with updated cropLow/cropHigh
|
||||
clo = clo * osc + osh;
|
||||
chi = chi * osc + osh;
|
||||
if (clo > chi)
|
||||
std::swap(clo, chi);
|
||||
|
||||
// crop(x*isc + ish, a, b)*osc + osh
|
||||
// crop(x*isc*osc + ish*osc + osh, a', b')
|
||||
isc = isc * osc;
|
||||
|
Loading…
Reference in New Issue
Block a user