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

Fix fully-connected layer in case of number of rows less than 4

This commit is contained in:
Dmitry Kurtaev
2018-07-13 13:23:45 +03:00
parent 625d20b9b4
commit de6f0a537d
2 changed files with 10 additions and 9 deletions
@@ -612,7 +612,7 @@ bool ocl4dnnGEMV<float>(const CBLAS_TRANSPOSE TransA,
ret = k.run(1, globalsize, localsize, false);
}
if ((row_size % 4) != 0 && ret)
if (row_size < 4 || ((row_size % 4) != 0 && ret))
{
String kname = format("matvec_mul1_%s", use_half ? "half" : "float");
ocl::Kernel k_1(kname.c_str(), cv::ocl::dnn::matvec_mul_oclsrc, opts);