Skip to content

Commit

Permalink
[LPT] FuseSubtractToFakeQuantize after VariadicSplit
Browse files Browse the repository at this point in the history
  • Loading branch information
eshoguli committed Sep 13, 2020
1 parent 45186c5 commit 8c44d5b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ bool FuseSubtractToFakeQuantizeTransformation::transform(TransformationContext&
outputLowConst = fold<opset1::Subtract>(outputLowConst, value);
outputHighConst = fold<opset1::Subtract>(outputHighConst, value);

const auto fakeQuantizeParent = fakeQuantize->get_input_node_shared_ptr(0);
const size_t parentIndex = NetworkHelper::getInputIndex(fakeQuantizeParent, fakeQuantize);

auto newFakeQuantize = std::make_shared<op::TypeRelaxed<opset1::FakeQuantize>>(
opset1::FakeQuantize(fakeQuantize->get_input_node_shared_ptr(0),
opset1::FakeQuantize(
fakeQuantizeParent->output(parentIndex),
fakeQuantize->input_value(1),
fakeQuantize->input_value(2),
outputLowConst,
Expand Down

0 comments on commit 8c44d5b

Please sign in to comment.