From 41ace9d4e6c53188805b2f116a961ba5aacc191e Mon Sep 17 00:00:00 2001 From: Evgenya Stepyreva Date: Thu, 23 Dec 2021 13:41:27 +0300 Subject: [PATCH] Use opsets in sample of function creation (#7792) --- samples/cpp/ngraph_function_creation_sample/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/samples/cpp/ngraph_function_creation_sample/main.cpp b/samples/cpp/ngraph_function_creation_sample/main.cpp index 95ad7693a37..8883a21b14a 100644 --- a/samples/cpp/ngraph_function_creation_sample/main.cpp +++ b/samples/cpp/ngraph_function_creation_sample/main.cpp @@ -12,6 +12,7 @@ // clang-format off #include "openvino/openvino.hpp" +#include "openvino/opsets/opset1.hpp" #include "openvino/opsets/opset8.hpp" #include "ngraph/util.hpp" @@ -108,7 +109,7 @@ std::shared_ptr createNgraphFunction(const std::string& path_to_weigh Shape padBeginShape{0, 0}; Shape padEndShape{0, 0}; - auto maxPoolingNodeFirst = std::make_shared(addNodeFirst->output(0), + auto maxPoolingNodeFirst = std::make_shared(addNodeFirst->output(0), Strides{2, 2}, padBeginShape, padEndShape, @@ -138,7 +139,7 @@ std::shared_ptr createNgraphFunction(const std::string& path_to_weigh std::make_shared(convolutionNodeSecond->output(0), addSecondConstantNode->output(0)); // -------MAXPOOL 2-------- - auto maxPoolingNodeSecond = std::make_shared(addNodeSecond->output(0), + auto maxPoolingNodeSecond = std::make_shared(addNodeSecond->output(0), Strides{2, 2}, padBeginShape, padEndShape, @@ -152,7 +153,7 @@ std::shared_ptr createNgraphFunction(const std::string& path_to_weigh std::make_shared(element::Type_t::i64, reshapeFirstShape, data + reshapeOffset); auto reshapeFirstNode = - std::make_shared(maxPoolingNodeSecond->output(0), reshapeFirstConstantNode->output(0), true); + std::make_shared(maxPoolingNodeSecond->output(0), reshapeFirstConstantNode->output(0), true); // -------MatMul 1--------- auto matMulFirstShape = Shape{500, 800}; @@ -179,7 +180,7 @@ std::shared_ptr createNgraphFunction(const std::string& path_to_weigh std::make_shared(element::Type_t::i64, reshapeSecondShape, data + reshapeOffset); auto reshapeSecondNode = - std::make_shared(reluNode->output(0), reshapeSecondConstantNode->output(0), true); + std::make_shared(reluNode->output(0), reshapeSecondConstantNode->output(0), true); // -------MatMul 2--------- auto matMulSecondShape = Shape{10, 500};