Merge pull request #23645 from Abdurrahheem:ash/tf_init_input_check

Add assert to check if layer input size is not empty
This commit is contained in:
Alexander Smorkalov 2023-05-19 13:28:24 +03:00 committed by GitHub
commit f2311d1bfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -815,6 +815,7 @@ void RemoveIdentityOps(tensorflow::GraphDef& net)
if (type == "Identity" || type == "Dropout" || type == "PlaceholderWithDefault") {
identity_ops_idx.push_back(li);
CV_Assert(layer.input_size() != 0);
identity_ops[layer.name()] = layer.input(0);
}
}