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

dnn(ocl4dnn): don't use getUMat()

especially in CPU only processing
This commit is contained in:
Alexander Alekhin
2018-10-05 15:10:58 +03:00
parent 0101fa789c
commit 9d02d42afe
7 changed files with 48 additions and 20 deletions
+4 -2
View File
@@ -1452,8 +1452,10 @@ public:
if (umat_weights.empty())
{
transpose(blobs[0].reshape(1, inpCn), umat_weights);
umat_biases = hasBias() ? blobs[1].reshape(1, outCn).getUMat(ACCESS_READ) :
UMat::zeros(outCn, 1, CV_32F);
if (hasBias())
blobs[1].reshape(1, outCn).copyTo(umat_biases);
else
umat_biases = UMat::zeros(outCn, 1, CV_32F);
}
String buildopt = format("-DT=%s ", ocl::typeToStr(inputs[0].type()));