1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

dnn(test): avoid calling of cv::setNumThreads() in tests directly

It is not necessary by default.
Also it breaks test system command-line parameters: --perf_threads / --test_threads
This commit is contained in:
Alexander Alekhin
2017-12-27 14:56:29 +00:00
parent 5232ea1ee6
commit 9b131b5f7e
3 changed files with 2 additions and 10 deletions
-4
View File
@@ -107,8 +107,6 @@ void testLayerUsingCaffeModels(String basename, int targetId = DNN_TARGET_CPU,
String inpfile = (useCommonInputBlob) ? _tf("blob.npy") : _tf(basename + ".input.npy");
String outfile = _tf(basename + ".npy");
cv::setNumThreads(cv::getNumberOfCPUs());
Net net = readNetFromCaffe(prototxt, (useCaffeModel) ? caffemodel : String());
ASSERT_FALSE(net.empty());
@@ -536,8 +534,6 @@ void testLayerUsingDarknetModels(String basename, bool useDarknetModel = false,
String inpfile = (useCommonInputBlob) ? _tf("blob.npy") : _tf(basename + ".input.npy");
String outfile = _tf(basename + ".npy");
cv::setNumThreads(cv::getNumberOfCPUs());
Net net = readNetFromDarknet(cfg, (useDarknetModel) ? weights : String());
ASSERT_FALSE(net.empty());