diff --git a/modules/dnn/src/layers/scale_layer.cpp b/modules/dnn/src/layers/scale_layer.cpp index 266dec226a..0ac5209ed4 100644 --- a/modules/dnn/src/layers/scale_layer.cpp +++ b/modules/dnn/src/layers/scale_layer.cpp @@ -74,8 +74,8 @@ public: { float w = blobs[0].at(n); float b = hasBias ? blobs[1].at(n) : 0; - Mat outBlobPlane = getPlane(outBlob, cn, n); - Mat inpBlobPlane = getPlane(inpBlob, cn, n); + Mat outBlobPlane = slice(outBlob, cn, n); + Mat inpBlobPlane = slice(inpBlob, cn, n); inpBlobPlane.convertTo(outBlobPlane, CV_32F, w, b); } }