Class ov::pass::FakeQuantizeDecomposition¶
-
class FakeQuantizeDecomposition : public ov::pass::MatcherPass¶
FakeQuantizeDecomposition transformation decomposes FakeQuantize layer.
Expression from specification: if x <= min(input_low, input_high): output = output_low elif x > max(input_low, input_high): output = output_high else: output = round((x - input_low) / (input_high - input_low) * (levels-1)) / (levels-1) * (output_high - output_low) + output_low
expand brackets into round: round(x * (levels-1) / (input_high - input_low) - input_low * (levels-1) / (input_high - input_low)) div on (levels-1) and mult on (output_high - output_low) => mult on (output_high - output_low) / (levels-1)
=> round(x * (levels-1) / (input_high - input_low) - input_low * (levels-1) / (input_high - input_low)) * (output_high - output_low) / (levels-1) + output_low
This transformation doesn’t support following cases:
At least one ‘range’ input is not Constant
At least one ‘input_low’ input value greater or equal than ‘input_high’ input value