diff --git a/inference-engine/src/low_precision_transformations/src/add.cpp b/inference-engine/src/low_precision_transformations/src/add.cpp index 04dd8c0081a..c2d0dc50a0e 100644 --- a/inference-engine/src/low_precision_transformations/src/add.cpp +++ b/inference-engine/src/low_precision_transformations/src/add.cpp @@ -178,10 +178,10 @@ bool AddTransformation::transform(TransformationContext& context, ngraph::patter } // graph update - std::vector> inputs{ {}, {} }; + std::vector> inputs{ {}, {} }; auto fullPathInput = dequantizationFullPath.convert == nullptr ? dequantizationFullPath.data : dequantizationFullPath.convert; - inputs[emptyPathIndex] = dequantizationEmptyPath.data.get_node_shared_ptr(); + inputs[emptyPathIndex] = dequantizationEmptyPath.data; inputs[fullPathIndex] = std::make_shared( newSubtractFullPathValues == nullptr ? fullPathInput : diff --git a/inference-engine/src/low_precision_transformations/src/clamp.cpp b/inference-engine/src/low_precision_transformations/src/clamp.cpp index af99fd0bc4f..56cee1d88a4 100644 --- a/inference-engine/src/low_precision_transformations/src/clamp.cpp +++ b/inference-engine/src/low_precision_transformations/src/clamp.cpp @@ -77,7 +77,7 @@ bool ClampTransformation::transform(TransformationContext& context, ngraph::patt max += shift; } - replacement = std::make_shared(newClamp->get_input_node_shared_ptr(0), min, max); + replacement = std::make_shared(newClamp->get_input_source_output(0), min, max); } replace_node(newClamp, replacement); diff --git a/inference-engine/src/low_precision_transformations/src/convolution.cpp b/inference-engine/src/low_precision_transformations/src/convolution.cpp index 3b089f2eb56..6e933667a08 100644 --- a/inference-engine/src/low_precision_transformations/src/convolution.cpp +++ b/inference-engine/src/low_precision_transformations/src/convolution.cpp @@ -165,7 +165,7 @@ bool ConvolutionTransformation::transform(TransformationContext &context, ngraph if (is_type(convolution->get_input_node_ptr(0))) { auto newConvolution = convolution->clone_with_new_inputs({ - convolution->get_input_node_ptr(0)->get_input_node_shared_ptr(0), + convolution->get_input_node_ptr(0)->get_input_source_output(0), convolution->get_input_node_shared_ptr(1) }); replace_node(convolution, newConvolution); convolution = newConvolution; @@ -253,7 +253,7 @@ bool ConvolutionTransformation::transform(TransformationContext &context, ngraph std::shared_ptr childNode = reshapeFromWeights == nullptr ? convolution : reshapeFromWeights; auto newConvolution = convolution->clone_with_new_inputs({ - convolution->get_input_node_shared_ptr(0), + convolution->get_input_source_output(0), childNode.get() == convolution.get() ? convolution->get_input_node_ptr(1)->get_input_node_shared_ptr(0) : childNode->copy_with_new_inputs({convertFromWeights->input_value(0), childNode->input_value(1)})}); 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 caee119ea32..d57fcb6b419 100644 --- a/inference-engine/src/low_precision_transformations/src/fake_quantize.cpp +++ b/inference-engine/src/low_precision_transformations/src/fake_quantize.cpp @@ -182,8 +182,10 @@ std::shared_ptr FakeQuantizeTransformation::fuseElementwis return nullptr; } + const auto data = fq::getData(eltwise); + const size_t outputIdx = NetworkHelper::getParentOutputIndex(data, eltwise); std::shared_ptr newFakeQuantize = as_type_ptr(fakeQuantize->clone_with_new_inputs({ - fq::getData(eltwise), + data->output(outputIdx), inputLowConst_f32, inputHightConst_f32, fold(fakeQuantize->input_value(3), deqPrecision), diff --git a/inference-engine/src/low_precision_transformations/src/multiply.cpp b/inference-engine/src/low_precision_transformations/src/multiply.cpp index c181b689317..0094a283fb9 100644 --- a/inference-engine/src/low_precision_transformations/src/multiply.cpp +++ b/inference-engine/src/low_precision_transformations/src/multiply.cpp @@ -63,10 +63,10 @@ bool MultiplyTransformation::transform(TransformationContext& context, ngraph::p return false; } - auto multiplyParent = multiply->get_input_node_shared_ptr(multiplyBranch.first); - auto constParent = multiply->get_input_node_shared_ptr(multiplyBranch.first == 0 ? 1 : 0); - auto multiplyParentParent = multiplyParent->get_input_node_shared_ptr(multiplyBranch.second); - auto multiplyParentConst = multiplyParent->get_input_node_shared_ptr(multiplyBranch.second == 0 ? 1 : 0); + auto multiplyParent = multiply->get_input_source_output(multiplyBranch.first); + auto constParent = multiply->get_input_source_output(multiplyBranch.first == 0 ? 1 : 0); + auto multiplyParentParent = multiplyParent.get_node_shared_ptr()->get_input_source_output(multiplyBranch.second); + auto multiplyParentConst = multiplyParent.get_node_shared_ptr()->get_input_source_output(multiplyBranch.second == 0 ? 1 : 0); newMultiply = std::make_shared>( std::vector{ element::f32, element::f32 }, @@ -78,7 +78,7 @@ bool MultiplyTransformation::transform(TransformationContext& context, ngraph::p fold(constParent, element::f32)), element::f32).get()); - NetworkHelper::copyInfo(multiplyParent, newMultiply); + NetworkHelper::copyInfo(multiplyParent.get_node_shared_ptr(), newMultiply); NetworkHelper::copyInfo(multiply, newMultiply); if (!FakeQuantizeDequantization::checkElementwise(newMultiply)) { @@ -118,7 +118,7 @@ bool MultiplyTransformation::transform(TransformationContext& context, ngraph::p // after : Y = (SC1' * (X1 - SH1)) * (X2) , where : // SC1' = SC1 * SC2 std::shared_ptr newMultiplyValuesFullPath = fold(multiplyValuesEmptyPath, multiplyValuesFullPath); - std::vector> inputs{ {}, {} }; + OutputVector inputs{ {}, {} }; inputs[emptyPathIndex] = dequantizationEmptyPath.data; inputs[fullPathIndex] = std::make_shared( dequantizationFullPath.subtract == nullptr ? diff --git a/inference-engine/src/low_precision_transformations/src/network_helper.cpp b/inference-engine/src/low_precision_transformations/src/network_helper.cpp index 946ee3a03ea..b9721da7869 100644 --- a/inference-engine/src/low_precision_transformations/src/network_helper.cpp +++ b/inference-engine/src/low_precision_transformations/src/network_helper.cpp @@ -1102,7 +1102,7 @@ FakeQuantizeDequantization NetworkHelper::getDequantization(const std::shared_pt return 1ul; }; - Output dataNode = inPlace ? node : node->input_value(parentIndex); + Output dataNode = inPlace ? node->output(0) : node->input_value(parentIndex); const std::shared_ptr multiply = as_type_ptr(dataNode.get_node_shared_ptr()); std::shared_ptr multiplyConstant; diff --git a/inference-engine/src/low_precision_transformations/src/transformer.cpp b/inference-engine/src/low_precision_transformations/src/transformer.cpp index c96b79dff54..205cd77e930 100644 --- a/inference-engine/src/low_precision_transformations/src/transformer.cpp +++ b/inference-engine/src/low_precision_transformations/src/transformer.cpp @@ -218,6 +218,7 @@ LowPrecisionTransformations LowPrecisionTransformer::getAllTransformations(const add(params). add(params). add(params). + add(params). add(params). add(params). add(params). @@ -231,7 +232,6 @@ LowPrecisionTransformations LowPrecisionTransformer::getAllTransformations(const add(params). add(params). add(params). - add(params). addCleanup(params). addCleanup(params). diff --git a/inference-engine/tests/functional/inference_engine/lp_transformations/transformations_after_split_transformation.cpp b/inference-engine/tests/functional/inference_engine/lp_transformations/transformations_after_split_transformation.cpp new file mode 100644 index 00000000000..c63a38f1b45 --- /dev/null +++ b/inference-engine/tests/functional/inference_engine/lp_transformations/transformations_after_split_transformation.cpp @@ -0,0 +1,220 @@ +// Copyright (C) 2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "layer_transformation.hpp" + +#include +#include +#include + +#include +#include + +// general transformations +#include "low_precision/add.hpp" +#include "low_precision/avg_pool.hpp" +#include "low_precision/clamp.hpp" +#include "low_precision/convolution.hpp" +#include "low_precision/depth_to_space.hpp" +#include "low_precision/fake_quantize.hpp" +#include "low_precision/interpolate.hpp" +#include "low_precision/mat_mul.hpp" +#include "low_precision/max_pool.hpp" +#include "low_precision/multiply.hpp" +#include "low_precision/mvn.hpp" +#include "low_precision/normalize_l2.hpp" +#include "low_precision/prelu.hpp" +#include "low_precision/reshape.hpp" +#include "low_precision/relu.hpp" +#include "low_precision/squeeze.hpp" +#include "low_precision/subtract.hpp" +#include "low_precision/strided_slice.hpp" +#include "low_precision/transpose.hpp" +#include "low_precision/unsqueeze.hpp" + +// cleanup transformations +#include "low_precision/fuse_convert.hpp" +#include "low_precision/fuse_fake_quantize.hpp" +#include "low_precision/fuse_subtract_to_fake_quantize.hpp" +#include "low_precision/fuse_multiply_to_fake_quantize.hpp" +#include "low_precision/multiply_to_group_convolution.hpp" +#include "low_precision/subtract_multiply_to_multiply_add.hpp" + +#include "lpt_ngraph_functions/transformations_after_split_function.hpp" +#include "common_test_utils/ngraph_test_utils.hpp" +#include "simple_low_precision_transformer.hpp" + + +namespace { +using namespace testing; +using namespace ngraph; +using namespace ngraph::pass; + +SimpleLowPrecisionTransformer getTransformerWithTransformationByName( + const ngraph::pass::low_precision::LayerTransformation::Params& params, + std::string name) { + using namespace pass::low_precision; + SimpleLowPrecisionTransformer transformer; + + if (name == "AddTransformation") { + transformer.add(params); + return transformer; + } + if (name == "AvgPoolTransformation") { + transformer.add(params); + return transformer; + } + if (name == "ClampTransformation") { + transformer.add(params); + return transformer; + } + if (name == "ConvolutionTransformation") { + transformer.add(params); + return transformer; + } + if (name == "DepthToSpaceTransformation") { + transformer.add(params); + return transformer; + } + if (name == "FakeQuantizeTransformation") { + transformer.add(params); + return transformer; + } + if (name == "InterpolateTransformation") { + transformer.add(params); + return transformer; + } + if (name == "MatMulTransformation") { + transformer.add(params); + return transformer; + } + if (name == "MaxPoolTransformation") { + transformer.add(params); + return transformer; + } + if (name == "MultiplyTransformation") { + transformer.add(params); + return transformer; + } + if (name == "MVNTransformation") { + transformer.add(params); + return transformer; + } + if (name == "NormalizeL2Transformation") { + transformer.add(params); + return transformer; + } + if (name == "PReluTransformation") { + transformer.add(params); + return transformer; + } + if (name == "ReluTransformation") { + transformer.add(params); + return transformer; + } + if (name == "ReshapeTransformation") { + transformer.add(params); + return transformer; + } + if (name == "SqueezeTransformation") { + transformer.add(params); + return transformer; + } + if (name == "StridedSliceTransformation") { + transformer.add(params); + return transformer; + } + if (name == "TransposeTransformation") { + transformer.add(params); + return transformer; + } + if (name == "UnsqueezeTransformation") { + transformer.add(params); + return transformer; + } + if (name == "FuseConvertTransformation") { + transformer.add(params); + return transformer; + } + if (name == "FuseSubtractToFakeQuantizeTransformation") { + transformer.add(params); + return transformer; + } + if (name == "FuseMultiplyToFakeQuantizeTransformation") { + transformer.add(params); + return transformer; + } + if (name == "MultiplyToGroupConvolutionTransformation") { + transformer.add(params); + return transformer; + } + if (name == "SubtractMultiplyToMultiplyAddTransformation") { + transformer.add(params); + return transformer; + } + throw std::runtime_error("unexpected transformation name"); +} + +class TransformationsAfterSplitTransformation : public LayerTransformation, public testing::WithParamInterface { +public: + void SetUp() override { + const auto layerName = GetParam(); + function = ngraph::builder::subgraph::TransformationsAfterSplitFunction::get(layerName); + function->validate_nodes_and_infer_types(); + } + + static std::string getTestCaseName(testing::TestParamInfo obj) { + const auto layerName = obj.param; + std::ostringstream result; + + result << "additional_layer_name_" << layerName; + return result.str(); + } + +protected: + std::shared_ptr function; +}; + +TEST_P(TransformationsAfterSplitTransformation, Run) { + const std::string layerName = GetParam(); + const auto params = LayerTransformation::createParamsU8I8(); + SimpleLowPrecisionTransformer transformer = getTransformerWithTransformationByName(params, layerName); + + ASSERT_NO_THROW(transformer.transform(function)); +} + +const std::vector transformationNames = { + "AddTransformation", + "AvgPoolTransformation", + "ClampTransformation", + "ConvolutionTransformation", + "DepthToSpaceTransformation", + "FakeQuantizeTransformation", + "InterpolateTransformation", + "MatMulTransformation", + "MaxPoolTransformation", + "MultiplyTransformation", + "MVNTransformation", + "NormalizeL2Transformation", + "PReluTransformation", + "ReluTransformation", + "ReshapeTransformation", + "SqueezeTransformation", + "StridedSliceTransformation", + "TransposeTransformation", + "UnsqueezeTransformation", + "FuseConvertTransformation", + "FuseSubtractToFakeQuantizeTransformation", + "FuseMultiplyToFakeQuantizeTransformation", + "MultiplyToGroupConvolutionTransformation", + "SubtractMultiplyToMultiplyAddTransformation", +}; + +INSTANTIATE_TEST_CASE_P( + smoke_LPT, + TransformationsAfterSplitTransformation, + ::testing::ValuesIn(transformationNames), + TransformationsAfterSplitTransformation::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/transformations_after_split_function.hpp b/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/transformations_after_split_function.hpp new file mode 100644 index 00000000000..fdebd24f9d0 --- /dev/null +++ b/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/transformations_after_split_function.hpp @@ -0,0 +1,26 @@ +// Copyright (C) 2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +namespace ngraph { +namespace builder { +namespace subgraph { + +class TransformationsAfterSplitFunction { +public: + static std::shared_ptr get(const std::string transformationName); + + static std::shared_ptr getLayerByTransformationName( + const std::string transformationName, + const Output parent); +}; + +} // namespace subgraph +} // namespace builder +} // namespace ngraph diff --git a/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/transformations_after_split_function.cpp b/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/transformations_after_split_function.cpp new file mode 100644 index 00000000000..e7ccd1f6598 --- /dev/null +++ b/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/transformations_after_split_function.cpp @@ -0,0 +1,187 @@ +// Copyright (C) 2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "lpt_ngraph_functions/transformations_after_split_function.hpp" + +#include + +#include + +#include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" +#include "lpt_ngraph_functions/common/dequantization_operations.hpp" +#include "lpt_ngraph_functions/common/builders.hpp" + +namespace ngraph { +namespace builder { +namespace subgraph { + +std::shared_ptr TransformationsAfterSplitFunction::get(const std::string transformationName) { + const auto input = std::make_shared(element::u8, Shape{ 1, 3, 16, 16 }); + const size_t outputSize = 2ul; + + const auto axis = opset1::Constant::create(element::i64, Shape{}, { 2 }); + const auto splitLength = opset1::Constant::create(element::i64, Shape{ outputSize }, { 8, 8 }); + const auto variadicSplit = std::make_shared(input, axis, splitLength); + + ResultVector results; + for (size_t i = 0; i < outputSize; ++i) { + const auto additionalLayer = getLayerByTransformationName(transformationName, variadicSplit->output(i)); + results.push_back(std::make_shared(additionalLayer)); + } + + const auto function = std::make_shared( + results, + ngraph::ParameterVector{ input }, + "VariadicSplitAndAdditionalLayerTransformation"); + + return function; +} + +std::shared_ptr TransformationsAfterSplitFunction::getLayerByTransformationName( + const std::string transformationName, + const Output parent) { + if (transformationName == "AddTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + const auto addConstant = opset1::Constant::create(element::f32, Shape{}, { 128.f }); + return std::make_shared(dequantization, addConstant); + } + if (transformationName == "AvgPoolTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + return std::make_shared( + dequantization, + Strides{ 1, 1 }, + Shape{ 1, 1 }, + Shape{ 0, 0 }, + Shape{ 2, 2 }, + true, + op::RoundingType::FLOOR); + } + if (transformationName == "ClampTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + return std::make_shared(dequantization, 0.0, 6.0); + } + if (transformationName == "ConvolutionTransformation") { + const auto dequantizationOnData = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + const auto weights = opset1::Constant::create(element::i8, Shape{ 3, 3, 1, 1 }, { 2 }); + const auto dequantizationOnWeights = makeDequantization(weights, { {element::f32}, {}, {0.3f} }); + return std::make_shared( + dequantizationOnData, + dequantizationOnWeights, + Strides{ 1, 1 }, + CoordinateDiff{ 0, 0 }, + CoordinateDiff{ 0, 0 }, + Strides{ 1, 1 }); + } + if (transformationName == "DepthToSpaceTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + return std::make_shared(dequantization, opset1::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST, 3); + } + if (transformationName == "FakeQuantizeTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + return makeFakeQuantize(dequantization, element::f32, { 256, Shape{}, { 0.f }, { 255.f }, { 0.f }, { 127.f } }); + } + if (transformationName == "InterpolateTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + const auto outShape = opset1::Constant::create(element::i64, Shape{ 4 }, { 1, 4, 32, 32 }); + + op::v0::InterpolateAttrs attributes; + attributes.axes = AxisSet{ 2, 3 }; + attributes.mode = "nearest"; + attributes.align_corners = false; + attributes.antialias = false; + attributes.pads_begin = std::vector{ 0ul }; + attributes.pads_end = std::vector{ 0ul }; + + return std::make_shared(dequantization, outShape, attributes); + } + if (transformationName == "MatMulTransformation") { + const auto dequantizationOnData = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + const auto weights = opset1::Constant::create(element::i8, Shape{ 16, 16 }, { 2 }); + const auto dequantizationOnWeights = makeDequantization(weights, { {element::f32}, {}, { 0.3f } }); + return std::make_shared(dequantizationOnData, dequantizationOnWeights); + } + if (transformationName == "MaxPoolTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + return std::make_shared( + dequantization, + Strides{ 1, 1 }, + Shape{ 1, 1 }, + Shape{ 0, 0 }, + Shape{ 2, 2 }); + } + if (transformationName == "MultiplyTransformation") { + const auto dequantization = makeDequantization(parent, { {}, {}, {{ 2.f }, element::f32, {}} }); + return makeDequantization(dequantization, { {}, {}, { 0.2f } }); + } + if (transformationName == "MVNTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + return std::make_shared(dequantization, AxisSet{ 2, 3 }); + } + if (transformationName == "NormalizeL2Transformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + const auto axesNode = opset1::Constant::create(element::u64, ngraph::Shape{ 3 }, { 1, 2, 3 }); + return std::make_shared(dequantization, axesNode, 1e-6, ngraph::op::EpsMode::ADD); + } + if (transformationName == "PReluTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + const auto slope = std::make_shared(element::f32, Shape{}, std::vector { 0.1f }); + return std::make_shared(dequantization, slope); + } + if (transformationName == "ReluTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + return std::make_shared(dequantization); + } + if (transformationName == "ReshapeTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + const auto reshapeConst = opset1::Constant::create(element::i64, ngraph::Shape{ 3 }, { 1, 3, -1 }); + return std::make_shared(dequantization, reshapeConst, false); + } + if (transformationName == "SqueezeTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + const auto squeezeConst = opset1::Constant::create(element::i64, ngraph::Shape{ 1 }, { 0 }); + return std::make_shared(dequantization, squeezeConst); + } + if (transformationName == "StridedSliceTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + + std::vector mask{ 1, 0, 1, 1 }; + const auto beginParam = opset1::Constant::create(element::i64, Shape{ 4 }, { 0, 0, 0, 0 }); + const auto endParam = opset1::Constant::create(element::i64, Shape{ 4 }, { 1, 2, 1, 1 }); + const auto stridesParam = opset1::Constant::create(element::i64, Shape{ 4 }, { 1, 1, 1, 1 }); + + return std::make_shared(dequantization, beginParam, endParam, stridesParam, mask, mask); + } + if (transformationName == "TransposeTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + const auto transposeConstant = opset1::Constant::create(element::i64, Shape{ 4 }, { 0, 1, 3, 2 }); + return std::make_shared(dequantization, transposeConstant); + } + if (transformationName == "UnsqueezeTransformation") { + const auto dequantization = makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + const auto unsqueezeConst = opset1::Constant::create(element::i64, ngraph::Shape{ 1 }, { 0 }); + return std::make_shared(dequantization, unsqueezeConst); + } + if (transformationName == "FuseConvertTransformation") { + return makeDequantization(parent, { {element::f32}, {}, { 0.1f } }); + } + if (transformationName == "FuseSubtractToFakeQuantizeTransformation") { + const auto fakeQuantize = makeFakeQuantize(parent, element::f32, { 256, Shape{}, { 0.f }, { 255.f }, { 0.f }, { 127.f } }); + return makeDequantization(fakeQuantize, { {}, {{ 128.f }, element::f32, {}}, {} }); + } + if (transformationName == "FuseMultiplyToFakeQuantizeTransformation") { + const auto fakeQuantize = makeFakeQuantize(parent, element::f32, { 256, Shape{}, { 0.f }, { 255.f }, { 0.f }, { 127.f } }); + return makeDequantization(fakeQuantize, { {}, {}, {{ 2.f }, element::f32, {}} }); + } + if (transformationName == "MultiplyToGroupConvolutionTransformation") { + return makeDequantization(parent, { {}, {{ 128.f }, element::f32, {}}, { 2.f } }); + } + if (transformationName == "SubtractMultiplyToMultiplyAddTransformation") { + return makeDequantization(parent, { {}, {{ 128.f }, element::f32, {}}, { 2.f } }); + } + throw std::runtime_error("unexpected additional layer name"); +} + +} // namespace subgraph +} // namespace builder +} // namespace ngraph