Merge pull request #16647 from YashasSamaga:cuda4dnn-hotfix-i16568

This commit is contained in:
Alexander Alekhin 2020-02-22 22:21:56 +00:00
commit 8eafddf211

View File

@ -31,7 +31,7 @@ namespace cv { namespace dnn { namespace cuda4dnn {
: stream(std::move(stream_)), cublasHandle(std::move(handle)), axis{ axis }
{
weightsTensor = csl::makeTensorHeader<T>(weights);
CV_Assert(get_effective_rank(weightsTensor) == 2);
CV_Assert(get_effective_rank(weightsTensor) <= 2);
csl::copyMatToTensor<T>(weights, weightsTensor, stream);
if (!bias.empty())