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

dnn: fix BatchNorm bias blob index in validation

When hasBias is true, CV_Assert must reference blobs[biasBlobIndex], not blobs[weightsBlobIndex], for the bias tensor.
This commit is contained in:
Weixie Cui
2026-03-22 02:52:52 +08:00
parent 4413c953d1
commit 1612fd9ac3
+1 -1
View File
@@ -84,7 +84,7 @@ public:
if( hasBias )
{
CV_Assert((size_t)biasBlobIndex < blobs.size());
const Mat& b = blobs[weightsBlobIndex];
const Mat& b = blobs[biasBlobIndex];
CV_Assert(b.isContinuous() && b.type() == CV_32F && b.total() == (size_t)n);
}