|
|
|
@ -209,7 +209,8 @@ public: |
|
|
|
|
#ifdef HAVE_INF_ENGINE |
|
|
|
|
if (backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) |
|
|
|
|
{ |
|
|
|
|
return type != STOCHASTIC && kernel_size.size() > 1 && (kernel_size.size() != 3 || !isArmComputePlugin()); |
|
|
|
|
return type != STOCHASTIC && kernel_size.size() > 1 && (kernel_size.size() != 3 || !isArmComputePlugin()) && |
|
|
|
|
(!computeMaxIdx || INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2022_1)); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
if (backendId == DNN_BACKEND_OPENCV) |
|
|
|
@ -615,10 +616,14 @@ public: |
|
|
|
|
else if (type == MAX) { |
|
|
|
|
std::shared_ptr<ngraph::Node> max_pool; |
|
|
|
|
if (computeMaxIdx) { |
|
|
|
|
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2022_1) |
|
|
|
|
std::vector<size_t> dilations(kernel_size.size(), 1); |
|
|
|
|
max_pool = std::make_shared<ngraph::op::v8::MaxPool>(ieInpNode, ngraph::Strides(strides), ngraph::Strides(dilations), |
|
|
|
|
ngraph::Shape(pads_begin), ngraph::Shape(pads_end), ngraph::Shape(kernel_size), |
|
|
|
|
rounding_type, pad_type); |
|
|
|
|
#else |
|
|
|
|
CV_Error(Error::StsNotImplemented, "OpenVINO MaxPool with indices"); |
|
|
|
|
#endif |
|
|
|
|
} else { |
|
|
|
|
max_pool = std::make_shared<ngraph::op::v1::MaxPool>(ieInpNode, ngraph::Strides(strides), |
|
|
|
|
ngraph::Shape(pads_begin), ngraph::Shape(pads_end), ngraph::Shape(kernel_size), |
|
|
|
|