diff --git a/inference-engine/src/low_precision_transformations/src/convolution.cpp b/inference-engine/src/low_precision_transformations/src/convolution.cpp index 6496ee4ee54eab..aeaacbe700174a 100644 --- a/inference-engine/src/low_precision_transformations/src/convolution.cpp +++ b/inference-engine/src/low_precision_transformations/src/convolution.cpp @@ -90,14 +90,14 @@ bool ConvolutionTransformation::transform(TransformationContext &context, ngraph broadcastShape[1] = subtract->get_output_shape(0)[1]; std::shared_ptr newShift = fold( - subtract->input_value(1).get_node_shared_ptr(), + subtract->input_value(1), std::make_shared( element::i64, Shape{ length }, broadcastShape)); const auto newSubtract = as_type_ptr(subtract->clone_with_new_inputs({ - subtract->input_value(0).get_node_shared_ptr(), + subtract->input_value(0), newShift })); NetworkHelper::copyInfo(subtract, newSubtract); replace_node(subtract, newSubtract); @@ -176,7 +176,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_source_output(0), - convolution->get_input_node_shared_ptr(1) }); + convolution->input_value(1)}); replace_node(convolution, newConvolution); convolution = newConvolution; } @@ -249,7 +249,7 @@ bool ConvolutionTransformation::transform(TransformationContext &context, ngraph zeroPointShape[0] = weightsShape[0]; auto zeroPointConstant = fold( - subtractFromWeights->get_input_node_shared_ptr(1), + subtractFromWeights->input_value(1), std::make_shared(element::i32, Shape{ zeroPointShape.size() }, zeroPointShape)); NetworkHelper::copyInfo(subtractFromWeights->get_input_node_shared_ptr(1), zeroPointConstant); replace_node(subtractFromWeights->get_input_node_shared_ptr(1), zeroPointConstant); @@ -266,7 +266,7 @@ bool ConvolutionTransformation::transform(TransformationContext &context, ngraph auto newConvolution = convolution->clone_with_new_inputs({ convolution->get_input_source_output(0), childNode.get() == convolution.get() ? - convolution->get_input_node_ptr(1)->get_input_node_shared_ptr(0) : + convolution->get_input_node_ptr(1)->input_value(0) : childNode->copy_with_new_inputs({convertFromWeights->input_value(0), childNode->input_value(1)})}); replace_node(convolution, newConvolution); convolution = newConvolution; 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 index fa3fe4097679b5..d4e5b3773055be 100644 --- 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 @@ -69,7 +69,7 @@ SimpleLowPrecisionTransformer getTransformerWithTransformationByName( transformer.add(params); return transformer; } - if (name == "ConvolutionTransformation") { + if (name == "ConvolutionTransformation" || name == "AsymmetricConvolutionTransformation") { transformer.add(params); return transformer; } @@ -190,6 +190,7 @@ const std::vector transformationNames = { "AvgPoolTransformation", "ClampTransformation", "ConvolutionTransformation", + "AsymmetricConvolutionTransformation", "DepthToSpaceTransformation", "FakeQuantizeTransformation", "InterpolateTransformation", 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 index 69dafb9422e892..8b2010abb76a12 100644 --- 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 @@ -78,6 +78,18 @@ std::shared_ptr TransformationsAfterSplitFunction::getLayerByTransformatio CoordinateDiff{ 0, 0 }, Strides{ 1, 1 }); } + if (transformationName == "AsymmetricConvolutionTransformation") { + const auto dequantizationOnData = makeDequantization(parent, { {element::f32}, { 128.f }, { 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);