1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge pull request #14368 from dkurt:dnn_ie_tests

This commit is contained in:
Alexander Alekhin
2019-04-30 19:35:00 +00:00
6 changed files with 66 additions and 9 deletions
+12 -6
View File
@@ -28,7 +28,8 @@ public:
};
void testONNXModels(const String& basename, const Extension ext = npy,
const double l1 = 0, const float lInf = 0, const bool useSoftmax = false)
const double l1 = 0, const float lInf = 0, const bool useSoftmax = false,
bool checkNoFallbacks = true)
{
String onnxmodel = _tf("models/" + basename + ".onnx");
Mat inp, ref;
@@ -67,6 +68,8 @@ public:
ref = netSoftmax.forward();
}
normAssert(ref, out, "", l1 ? l1 : default_l1, lInf ? lInf : default_lInf);
if (checkNoFallbacks)
expectNoFallbacksFromIE(net);
}
};
@@ -103,11 +106,11 @@ TEST_P(Test_ONNX_layers, Two_convolution)
TEST_P(Test_ONNX_layers, Deconvolution)
{
testONNXModels("deconvolution");
testONNXModels("two_deconvolution");
testONNXModels("deconvolution_group");
testONNXModels("deconvolution_output_shape");
testONNXModels("deconv_adjpad_2d");
testONNXModels("deconvolution", npy, 0, 0, false, false);
testONNXModels("two_deconvolution", npy, 0, 0, false, false);
testONNXModels("deconvolution_group", npy, 0, 0, false, false);
testONNXModels("deconvolution_output_shape", npy, 0, 0, false, false);
testONNXModels("deconv_adjpad_2d", npy, 0, 0, false, false);
}
TEST_P(Test_ONNX_layers, Dropout)
@@ -220,6 +223,7 @@ TEST_P(Test_ONNX_layers, MultyInputs)
Mat out = net.forward();
normAssert(ref, out, "", default_l1, default_lInf);
expectNoFallbacksFromIE(net);
}
TEST_P(Test_ONNX_layers, DynamicReshape)
@@ -257,6 +261,7 @@ TEST_P(Test_ONNX_nets, Alexnet)
Mat out = net.forward();
normAssert(out, ref, "", default_l1, default_lInf);
expectNoFallbacksFromIE(net);
}
TEST_P(Test_ONNX_nets, Squeezenet)
@@ -289,6 +294,7 @@ TEST_P(Test_ONNX_nets, Googlenet)
Mat out = net.forward();
normAssert(ref, out, "", default_l1, default_lInf);
expectNoFallbacksFromIE(net);
}
TEST_P(Test_ONNX_nets, CaffeNet)