diff --git a/modules/dnn/src/cuda4dnn/primitives/inner_product.hpp b/modules/dnn/src/cuda4dnn/primitives/inner_product.hpp index d5baa50b34..a0a00ce125 100644 --- a/modules/dnn/src/cuda4dnn/primitives/inner_product.hpp +++ b/modules/dnn/src/cuda4dnn/primitives/inner_product.hpp @@ -31,7 +31,7 @@ namespace cv { namespace dnn { namespace cuda4dnn { : stream(std::move(stream_)), cublasHandle(std::move(handle)), axis{ axis } { weightsTensor = csl::makeTensorHeader(weights); - CV_Assert(get_effective_rank(weightsTensor) == 2); + CV_Assert(get_effective_rank(weightsTensor) <= 2); csl::copyMatToTensor(weights, weightsTensor, stream); if (!bias.empty())