diff --git a/inference-engine/src/low_precision_transformations/src/fake_quantize.cpp b/inference-engine/src/low_precision_transformations/src/fake_quantize.cpp index 72c4dab06d312e..fd4414fc86f2ef 100644 --- a/inference-engine/src/low_precision_transformations/src/fake_quantize.cpp +++ b/inference-engine/src/low_precision_transformations/src/fake_quantize.cpp @@ -191,14 +191,14 @@ std::shared_ptr FakeQuantizeTransformation::fuseElementwis const auto data = fq::getData(eltwise); const size_t outputIdx = NetworkHelper::getParentOutputIndex(data, eltwise); - std::shared_ptr newFakeQuantize = matcherPass.register_new_node( + std::shared_ptr newFakeQuantize = as_type_ptr(fakeQuantize->clone_with_new_inputs({ data->output(outputIdx), inputLowConst_f32, inputHighConst_f32, foldConvert(fakeQuantize->input_value(3), deqPrecision), - foldConvert(fakeQuantize->input_value(4), deqPrecision), - fakeQuantize->get_levels(), - fakeQuantize->get_auto_broadcast()); + foldConvert(fakeQuantize->input_value(4), deqPrecision) })); + + matcherPass.register_new_node(newFakeQuantize); replace_node(fakeQuantize, newFakeQuantize); ngraph::copy_runtime_info({ fakeQuantize, eltwise }, newFakeQuantize); diff --git a/ngraph/core/include/ngraph/pass/graph_rewrite.hpp b/ngraph/core/include/ngraph/pass/graph_rewrite.hpp index 3b248d50ecba6b..87a7f8677884e6 100644 --- a/ngraph/core/include/ngraph/pass/graph_rewrite.hpp +++ b/ngraph/core/include/ngraph/pass/graph_rewrite.hpp @@ -77,6 +77,13 @@ namespace ngraph return node; } + template + std::shared_ptr register_new_node(const std::shared_ptr& node) + { + m_new_nodes.push_back(node); + return node; + } + const std::vector>& get_new_nodes() { return m_new_nodes;