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");