Hello reshape SSD sample fix (#12004)
This commit is contained in:
parent
7834dba545
commit
5a5c404f13
@ -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<ov::Node> 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<ov::Node>& 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");
|
||||
|
Loading…
Reference in New Issue
Block a user