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

Merge pull request #22840 from zihaomu:optimze_conv_memory_usage

DNN: reduce the memory used in convolution layer

* reduce the memory in winograd and disabel the test when usage memory is larger than 2gb.

* remove VERY_LOG tag
This commit is contained in:
Zihao Mu
2022-12-08 20:57:13 +08:00
committed by GitHub
parent ab912329b6
commit 0a650b573b
5 changed files with 105 additions and 92 deletions
+4 -2
View File
@@ -29,7 +29,7 @@ public:
void processNet(std::string weights, std::string proto,
Mat inp, const std::string& outputLayer = "",
std::string halideScheduler = "",
double l1 = 0.0, double lInf = 0.0, double detectionConfThresh = 0.2)
double l1 = 0.0, double lInf = 0.0, double detectionConfThresh = 0.2, bool useWinograd = true)
{
checkBackend();
l1 = l1 ? l1 : default_l1;
@@ -49,6 +49,7 @@ public:
net.setInput(inp);
net.setPreferableBackend(backend);
net.setPreferableTarget(target);
net.enableWinograd(useWinograd);
if (backend == DNN_BACKEND_HALIDE && !halideScheduler.empty())
{
halideScheduler = findDataFile(halideScheduler);
@@ -347,7 +348,8 @@ TEST_P(DNNTestNetwork, SSD_VGG16)
}
processNet("dnn/VGG_ILSVRC2016_SSD_300x300_iter_440000.caffemodel",
"dnn/ssd_vgg16.prototxt", inp, "detection_out", "", scoreDiff, iouDiff);
"dnn/ssd_vgg16.prototxt", inp, "detection_out", "", scoreDiff,
iouDiff, 0.2, false);
expectNoFallbacksFromIE(net);
}