Fix crash on CompileModelCacheTestBase.CompareWithRefImpl/KSOFunction (#14678)

This commit is contained in:
Sofya Balandina 2022-12-21 10:18:41 +00:00 committed by GitHub
parent 271681a07f
commit 20ca25bfca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,13 +196,13 @@ inline std::shared_ptr<ngraph::Function> makeSplitConvConcat(std::vector<size_t>
inline std::shared_ptr<ngraph::Function> makeKSOFunction(std::vector<size_t> inputShape = {1, 4, 20, 20},
ngraph::element::Type_t ngPrc = ngraph::element::Type_t::f32) {
auto params = ngraph::builder::makeParams(ngPrc, {inputShape});
auto params = ngraph::builder::makeParams(ngPrc, {inputShape, inputShape});
auto shapeOf = std::make_shared<ngraph::opset4::ShapeOf>(params[0]);
auto convert = std::make_shared<ngraph::opset4::Convert>(shapeOf, ngPrc);
auto newShape = ngraph::builder::makeConstant<int64_t>(ngraph::element::i64, {4}, {1, 4, 1, 1});
auto reshape = std::make_shared<ngraph::opset4::Reshape>(convert, newShape, false);
auto conv1 = ngraph::builder::makeConvolution(params[0], ngPrc, {3, 3}, {1, 1}, {0, 0}, {0, 0}, {1, 1},
auto conv1 = ngraph::builder::makeConvolution(params[1], ngPrc, {3, 3}, {1, 1}, {0, 0}, {0, 0}, {1, 1},
ngraph::op::PadType::EXPLICIT, 4);
auto relu1 = std::make_shared<ngraph::opset4::Relu>(conv1);
auto add = std::make_shared<ngraph::opset4::Add>(relu1, reshape);