Skip to content

Commit 80d1f2d

Browse files
committed
re-enable tensor flow mobilenet ssd ocl test
Signed-off-by: Li Peng <[email protected]>
1 parent 5992c46 commit 80d1f2d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

modules/dnn/test/test_backends.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,7 @@ TEST_P(DNNTestNetwork, MobileNet_SSD_Caffe)
174174

175175
TEST_P(DNNTestNetwork, MobileNet_SSD_TensorFlow)
176176
{
177-
if (backend == DNN_BACKEND_DEFAULT && target == DNN_TARGET_OPENCL ||
178-
backend == DNN_BACKEND_HALIDE)
179-
throw SkipTestException("");
177+
if (backend == DNN_BACKEND_HALIDE) throw SkipTestException("");
180178
Mat sample = imread(findDataFile("dnn/street.png", false));
181179
Mat inp = blobFromImage(sample, 1.0f / 127.5, Size(300, 300), Scalar(127.5, 127.5, 127.5), false);
182180
processNet("dnn/ssd_mobilenet_v1_coco.pb", "dnn/ssd_mobilenet_v1_coco.pbtxt",

modules/dnn/test/test_tf_importer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ TEST(Test_TensorFlow, Inception_v2_SSD)
279279
normAssert(detections, ref);
280280
}
281281

282-
OCL_TEST(Test_TensorFlow, DISABLED_MobileNet_SSD)
282+
OCL_TEST(Test_TensorFlow, MobileNet_SSD)
283283
{
284284
std::string netPath = findDataFile("dnn/ssd_mobilenet_v1_coco.pb", false);
285285
std::string netConfig = findDataFile("dnn/ssd_mobilenet_v1_coco.pbtxt", false);
@@ -311,8 +311,8 @@ OCL_TEST(Test_TensorFlow, DISABLED_MobileNet_SSD)
311311
std::vector<Mat> output;
312312
net.forward(output, outNames);
313313

314-
normAssert(target[0].reshape(1, 1), output[0].reshape(1, 1));
315-
normAssert(target[1].reshape(1, 1), output[1].reshape(1, 1), "", 1e-5, 2e-4);
314+
normAssert(target[0].reshape(1, 1), output[0].reshape(1, 1), "", 1e-5, 1.5e-4);
315+
normAssert(target[1].reshape(1, 1), output[1].reshape(1, 1), "", 1e-5, 3e-4);
316316
normAssert(target[2].reshape(1, 1), output[2].reshape(1, 1), "", 4e-5, 1e-2);
317317
}
318318

0 commit comments

Comments
 (0)