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:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user