Skip to content

Commit 97af608

Browse files
committed
Merge pull request opencv#10397 from mshabunin:fix-incorrect-assert
2 parents b85c772 + aa46e31 commit 97af608

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
@@ -930,7 +930,7 @@ void TFImporter::populateNet(Net dstNet)
930930
data_layouts[name] = DATA_LAYOUT_NHWC;
931931
}
932932
else
933-
CV_Assert(Error::StsParseError, "Only NHWC <-> NCHW permutations are allowed.");
933+
CV_Error(Error::StsParseError, "Only NHWC <-> NCHW permutations are allowed.");
934934
}
935935
else if (data_layouts[layer.input(0)] == DATA_LAYOUT_NCHW)
936936
{
@@ -947,7 +947,7 @@ void TFImporter::populateNet(Net dstNet)
947947
data_layouts[name] = DATA_LAYOUT_NCHW;
948948
}
949949
else
950-
CV_Assert(Error::StsParseError, "Only NHWC <-> NCHW permutations are allowed.");
950+
CV_Error(Error::StsParseError, "Only NHWC <-> NCHW permutations are allowed.");
951951
}
952952
int id = dstNet.addLayer(name, "Identity", layerParams);
953953
layer_id[name] = id;

0 commit comments

Comments
 (0)