add assert to check if layer input size is not empty

pull/23645/head
Abduragim Shtanchaev 2 years ago
parent 725e440d27
commit 2b9d2c726a
  1. 1
      modules/dnn/src/tensorflow/tf_graph_simplifier.cpp

@ -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);
}
}

Loading…
Cancel
Save