mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 11:10:21 +08:00
Merge pull request #21569 from alalek:fixup_18031
This commit is contained in:
commit
b41d2c5c14
@ -2196,9 +2196,22 @@ struct Net::Impl : public detail::NetImplBase
|
||||
continue;
|
||||
|
||||
auto ieInpNode = inputNodes[i].dynamicCast<InfEngineNgraphNode>();
|
||||
CV_Assert(oid < ieInpNode->node->get_output_size());
|
||||
const auto& ngraph_input_node = ieInpNode->node;
|
||||
CV_LOG_DEBUG(NULL, "DNN/IE: bind output port " << lid << ":" << oid << " (" << ngraph_input_node->get_friendly_name() << ":" << ngraph_input_node->get_type_info().name << ")");
|
||||
|
||||
// Handle parameters from other subnets. Output port is not used in this case
|
||||
if ((ngraph::op::is_parameter(ngraph_input_node) || ngraph::op::is_constant(ngraph_input_node)) &&
|
||||
ngraph_input_node->get_output_size() == 1)
|
||||
{
|
||||
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ngraph_input_node));
|
||||
continue;
|
||||
}
|
||||
CV_CheckLT((size_t)oid, ngraph_input_node->get_output_size(), "");
|
||||
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
|
||||
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ieInpNode->node));
|
||||
// FIXIT refactor ".initNgraph()" API to use Output<Node>
|
||||
// WA: use Concat to emulate Identity operation with requested output port
|
||||
auto oid_node = std::make_shared<ngraph::op::Concat>(ngraph::OutputVector {ngraph_input_node->output(oid)}, 0);
|
||||
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(oid_node));
|
||||
#elif INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_3)
|
||||
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ieInpNode->node->get_output_as_single_output_node(oid)));
|
||||
#else
|
||||
|
@ -330,7 +330,7 @@ public:
|
||||
InfEngineNgraphNode::InfEngineNgraphNode(std::shared_ptr<ngraph::Node>&& _node)
|
||||
: BackendNode(DNN_BACKEND_INFERENCE_ENGINE_NGRAPH), node(std::move(_node)) {}
|
||||
|
||||
InfEngineNgraphNode::InfEngineNgraphNode(std::shared_ptr<ngraph::Node>& _node)
|
||||
InfEngineNgraphNode::InfEngineNgraphNode(const std::shared_ptr<ngraph::Node>& _node)
|
||||
: BackendNode(DNN_BACKEND_INFERENCE_ENGINE_NGRAPH), node(_node) {}
|
||||
|
||||
InfEngineNgraphNode::InfEngineNgraphNode(const std::vector<Ptr<BackendNode> >& nodes,
|
||||
|
@ -102,7 +102,7 @@ public:
|
||||
std::vector<Mat>& internals);
|
||||
|
||||
InfEngineNgraphNode(std::shared_ptr<ngraph::Node>&& _node);
|
||||
InfEngineNgraphNode(std::shared_ptr<ngraph::Node>& _node);
|
||||
InfEngineNgraphNode(const std::shared_ptr<ngraph::Node>& _node);
|
||||
|
||||
void setName(const std::string& name);
|
||||
|
||||
|
@ -1697,26 +1697,11 @@ CASE(test_spacetodepth)
|
||||
CASE(test_spacetodepth_example)
|
||||
// no filter
|
||||
CASE(test_split_equal_parts_1d)
|
||||
#if INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||
SKIP_CPU;
|
||||
// MYRIAD is ok
|
||||
SKIP_OPENCL;
|
||||
SKIP_OPENCL_FP16;
|
||||
#endif
|
||||
// no filter
|
||||
CASE(test_split_equal_parts_2d)
|
||||
#if INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||
SKIP_CPU;
|
||||
// MYRIAD is ok
|
||||
SKIP_OPENCL;
|
||||
SKIP_OPENCL_FP16;
|
||||
#endif
|
||||
// no filter
|
||||
CASE(test_split_equal_parts_default_axis)
|
||||
#if INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||
SKIP_CPU;
|
||||
// MYRIAD is ok
|
||||
SKIP_OPENCL;
|
||||
SKIP_OPENCL_FP16;
|
||||
#endif
|
||||
// no filter
|
||||
CASE(test_split_variable_parts_1d)
|
||||
// no filter
|
||||
CASE(test_split_variable_parts_2d)
|
||||
|
Loading…
Reference in New Issue
Block a user