Extend LRN layer support with IE backend

pull/14141/head
Dmitry Kurtaev 6 years ago
parent 097fc1a271
commit 714b38360f
  1. 2
      modules/dnn/src/layers/lrn_layer.cpp
  2. 4
      modules/dnn/test/test_halide_layers.cpp

@ -91,7 +91,7 @@ public:
virtual bool supportBackend(int backendId) CV_OVERRIDE virtual bool supportBackend(int backendId) CV_OVERRIDE
{ {
if (backendId == DNN_BACKEND_INFERENCE_ENGINE) if (backendId == DNN_BACKEND_INFERENCE_ENGINE)
return (bias == 1) && (preferableTarget != DNN_TARGET_MYRIAD || type == SPATIAL_NRM); return bias == 1;
return backendId == DNN_BACKEND_OPENCV || backendId == DNN_BACKEND_HALIDE; return backendId == DNN_BACKEND_OPENCV || backendId == DNN_BACKEND_HALIDE;
} }

@ -228,6 +228,10 @@ TEST_P(LRN, Accuracy)
Backend backendId = get<0>(get<5>(GetParam())); Backend backendId = get<0>(get<5>(GetParam()));
Target targetId = get<1>(get<5>(GetParam())); Target targetId = get<1>(get<5>(GetParam()));
if ((inSize.width == 5 || inSize.height == 5) && targetId == DNN_TARGET_MYRIAD &&
nrmType == "ACROSS_CHANNELS")
throw SkipTestException("This test case is disabled");
LayerParams lp; LayerParams lp;
lp.set("norm_region", nrmType); lp.set("norm_region", nrmType);
lp.set("local_size", localSize); lp.set("local_size", localSize);

Loading…
Cancel
Save