Merge pull request #22249 from fengyuentau:fix_for_22221

This commit is contained in:
Alexander Alekhin 2022-07-16 11:59:30 +00:00
commit 1d134025a5

View File

@ -2541,6 +2541,8 @@ void TFImporter::parsePack(tensorflow::GraphDef& net, const tensorflow::NodeDef&
if (dim != 0)
CV_Error(Error::StsNotImplemented, "Unsupported mode of pack operation.");
data_layouts[name] = DATA_LAYOUT_UNKNOWN;
CV_Assert(hasLayerAttr(layer, "N"));
int num = (int)getLayerAttr(layer, "N").i();
CV_CheckEQ(num_inputs, num, "");