Skip to content

Commit

Permalink
fix weights rank assertion in InnerProductOp
Browse files Browse the repository at this point in the history
  • Loading branch information
YashasSamaga committed Feb 22, 2020
1 parent 96b26dc commit c23ab37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/dnn/src/cuda4dnn/primitives/inner_product.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit c23ab37

Please sign in to comment.