Skip to content

Commit 7ce2397

Browse files
committed
Fix a bug in FusedBatchNorm (TensorFlow) layer importer
1 parent dad2247 commit 7ce2397

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/dnn/src/tensorflow/tf_importer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,8 +1509,8 @@ void TFImporter::populateNet(Net dstNet)
15091509
if (layerParams.blobs.size() == 2)
15101510
CV_Error(Error::StsNotImplemented, "Cannot determine number "
15111511
"of parameters for batch normalization layer.");
1512-
mean = Mat::zeros(1, layerParams.blobs[3].total(), CV_32F);
1513-
std = Mat::ones(1, layerParams.blobs[3].total(), CV_32F);
1512+
mean = Mat::zeros(1, layerParams.blobs[2].total(), CV_32F);
1513+
std = Mat::ones(1, layerParams.blobs[2].total(), CV_32F);
15141514

15151515
// Add an extra layer: Mean-Variance normalization
15161516
LayerParams mvnParams;

0 commit comments

Comments
 (0)