From 5a5c404f1329e2248eecfb6698d942690db2a20d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Do=C5=82bniak?= Date: Thu, 30 Jun 2022 12:35:14 +0200 Subject: [PATCH] Hello reshape SSD sample fix (#12004) --- samples/cpp/hello_reshape_ssd/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/samples/cpp/hello_reshape_ssd/main.cpp b/samples/cpp/hello_reshape_ssd/main.cpp index 0ada1b50cd2..8efd5a740d0 100644 --- a/samples/cpp/hello_reshape_ssd/main.cpp +++ b/samples/cpp/hello_reshape_ssd/main.cpp @@ -8,7 +8,7 @@ // clang-format off #include "openvino/openvino.hpp" -#include "ngraph/ngraph.hpp" +#include "openvino/opsets/opset9.hpp" #include "format_reader_ptr.h" #include "samples/args_helper.hpp" @@ -51,9 +51,10 @@ int main(int argc, char* argv[]) { // SSD has an additional post-processing DetectionOutput layer that simplifies output filtering, // try to find it. - ov::NodeVector ops = model->get_ops(); - auto it = std::find_if(ops.begin(), ops.end(), [](std::shared_ptr node) { - return node->get_type_info() == ngraph::op::DetectionOutput::get_type_info_static(); + const ov::NodeVector ops = model->get_ops(); + const auto it = std::find_if(ops.begin(), ops.end(), [](const std::shared_ptr& node) { + return std::string{node->get_type_name()} == + std::string{ov::opset9::DetectionOutput::get_type_info_static().name}; }); if (it == ops.end()) { throw std::logic_error("model does not contain DetectionOutput layer");