re-enable tensor flow mobilenet ssd ocl test
authorLi Peng <peng.li@intel.com>
Mon, 12 Feb 2018 11:14:41 +0000 (19:14 +0800)
committerLi Peng <peng.li@intel.com>
Tue, 13 Feb 2018 17:04:58 +0000 (01:04 +0800)
Signed-off-by: Li Peng <peng.li@intel.com>
modules/dnn/test/test_backends.cpp
modules/dnn/test/test_tf_importer.cpp

index 6ed9262..89ed5d0 100644 (file)
@@ -174,9 +174,7 @@ TEST_P(DNNTestNetwork, MobileNet_SSD_Caffe)
 
 TEST_P(DNNTestNetwork, MobileNet_SSD_TensorFlow)
 {
-    if (backend == DNN_BACKEND_DEFAULT && target == DNN_TARGET_OPENCL ||
-        backend == DNN_BACKEND_HALIDE)
-        throw SkipTestException("");
+    if (backend == DNN_BACKEND_HALIDE) throw SkipTestException("");
     Mat sample = imread(findDataFile("dnn/street.png", false));
     Mat inp = blobFromImage(sample, 1.0f / 127.5, Size(300, 300), Scalar(127.5, 127.5, 127.5), false);
     processNet("dnn/ssd_mobilenet_v1_coco.pb", "dnn/ssd_mobilenet_v1_coco.pbtxt",
index 9cebd23..8be2b6f 100644 (file)
@@ -279,7 +279,7 @@ TEST(Test_TensorFlow, Inception_v2_SSD)
     normAssert(detections, ref);
 }
 
-OCL_TEST(Test_TensorFlow, DISABLED_MobileNet_SSD)
+OCL_TEST(Test_TensorFlow, MobileNet_SSD)
 {
     std::string netPath = findDataFile("dnn/ssd_mobilenet_v1_coco.pb", false);
     std::string netConfig = findDataFile("dnn/ssd_mobilenet_v1_coco.pbtxt", false);
@@ -311,8 +311,8 @@ OCL_TEST(Test_TensorFlow, DISABLED_MobileNet_SSD)
     std::vector<Mat> output;
     net.forward(output, outNames);
 
-    normAssert(target[0].reshape(1, 1), output[0].reshape(1, 1));
-    normAssert(target[1].reshape(1, 1), output[1].reshape(1, 1), "", 1e-5, 2e-4);
+    normAssert(target[0].reshape(1, 1), output[0].reshape(1, 1), "", 1e-5, 1.5e-4);
+    normAssert(target[1].reshape(1, 1), output[1].reshape(1, 1), "", 1e-5, 3e-4);
     normAssert(target[2].reshape(1, 1), output[2].reshape(1, 1), "", 4e-5, 1e-2);
 }