From e3286c90551ec454770aa1813f165eded0a31a4c Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Tue, 2 Apr 2019 14:05:17 +0300 Subject: [PATCH] Enable 1x1 convolution optimization --- modules/dnn/src/layers/convolution_layer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dnn/src/layers/convolution_layer.cpp b/modules/dnn/src/layers/convolution_layer.cpp index b872130ccd..7aaa8bc989 100644 --- a/modules/dnn/src/layers/convolution_layer.cpp +++ b/modules/dnn/src/layers/convolution_layer.cpp @@ -606,7 +606,7 @@ public: int inpCnAll = input.size[1], width = input.size[3], height = input.size[2]; int inpCn = inpCnAll / ngroups; - p.is1x1_ = kernel == Size(0,0) && pad == Size(0, 0); + p.is1x1_ = kernel == Size(1,1) && pad == Size(0, 0); p.useAVX = checkHardwareSupport(CPU_AVX); p.useAVX2 = checkHardwareSupport(CPU_AVX2); p.useAVX512 = CV_CPU_HAS_SUPPORT_AVX512_SKX;