Hello reshape SSD sample fix (#12004)

This commit is contained in:
Tomasz Dołbniak 2022-06-30 12:35:14 +02:00 committed by GitHub
parent 7834dba545
commit 5a5c404f13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@
// clang-format off // clang-format off
#include "openvino/openvino.hpp" #include "openvino/openvino.hpp"
#include "ngraph/ngraph.hpp" #include "openvino/opsets/opset9.hpp"
#include "format_reader_ptr.h" #include "format_reader_ptr.h"
#include "samples/args_helper.hpp" #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, // SSD has an additional post-processing DetectionOutput layer that simplifies output filtering,
// try to find it. // try to find it.
ov::NodeVector ops = model->get_ops(); const ov::NodeVector ops = model->get_ops();
auto it = std::find_if(ops.begin(), ops.end(), [](std::shared_ptr<ov::Node> node) { const auto it = std::find_if(ops.begin(), ops.end(), [](const std::shared_ptr<ov::Node>& node) {
return node->get_type_info() == ngraph::op::DetectionOutput::get_type_info_static(); return std::string{node->get_type_name()} ==
std::string{ov::opset9::DetectionOutput::get_type_info_static().name};
}); });
if (it == ops.end()) { if (it == ops.end()) {
throw std::logic_error("model does not contain DetectionOutput layer"); throw std::logic_error("model does not contain DetectionOutput layer");