Commit c23ab373 authored by YashasSamaga's avatar YashasSamaga

fix weights rank assertion in InnerProductOp

parent 96b26dc8
...@@ -31,7 +31,7 @@ namespace cv { namespace dnn { namespace cuda4dnn { ...@@ -31,7 +31,7 @@ namespace cv { namespace dnn { namespace cuda4dnn {
: stream(std::move(stream_)), cublasHandle(std::move(handle)), axis{ axis } : stream(std::move(stream_)), cublasHandle(std::move(handle)), axis{ axis }
{ {
weightsTensor = csl::makeTensorHeader<T>(weights); 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); csl::copyMatToTensor<T>(weights, weightsTensor, stream);
if (!bias.empty()) if (!bias.empty())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment