From 435a79a2a3678457c3dc34f84c5b0aaf05de1688 Mon Sep 17 00:00:00 2001 From: Maciej Kwapulinski Date: Fri, 14 Apr 2023 08:53:24 +0200 Subject: [PATCH] Fix stride height setting in input_conv test (#16813) --- .../src/subgraph/input_conv.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/tests/functional/shared_test_classes/src/subgraph/input_conv.cpp b/src/tests/functional/shared_test_classes/src/subgraph/input_conv.cpp index b83ab338e1d..b7deaae49c4 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/input_conv.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/input_conv.cpp @@ -79,9 +79,17 @@ void InputConvTest::SetUp() { auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); auto params = ngraph::builder::makeParams(ngPrc, { inputShape }); - auto conv0 = ngraph::builder::makeConvolution(params[0], ngPrc, { kernelShape[0], kernelShape[1] }, { stride, stride }, { 0, 0 }, - { 0, 0 }, { 1, 1 }, ngraph::op::PadType::VALID, outputChannels, true, - generateWeights(outputChannels, kernelShape[1])); + auto conv0 = ngraph::builder::makeConvolution(params[0], + ngPrc, + {kernelShape[0], kernelShape[1]}, + {kernelShape[0] > 1 ? stride : 1, stride}, + {0, 0}, + {0, 0}, + {1, 1}, + ngraph::op::PadType::VALID, + outputChannels, + true, + generateWeights(outputChannels, kernelShape[1])); if (addReshape) { size_t numOutputWidth = (((inputShape[1] * inputShape[2] * inputShape[3] - kernelShape[1] * kernelShape[0]) / (inputShape[1] * stride)) + 1);