MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / VerifySubGraphs

Function VerifySubGraphs

tensorflow/lite/tools/verifier.cc:295–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295bool VerifySubGraphs(const Model& model, ErrorReporter* error_reporter) {
296 if (!model.subgraphs()) {
297 ReportError(error_reporter, "Missing 'subgraphs' section.");
298 return false;
299 }
300 for (const auto& subgraph : *model.subgraphs()) {
301 if (!subgraph->operators()) {
302 ReportError(error_reporter, "Missing 'operators' section in subgraph.");
303 return false;
304 }
305
306 if (!VerifyOperators(*subgraph->operators(), error_reporter)) {
307 return false;
308 }
309
310 if (!VerifySubGraphConsistency(model, *subgraph, error_reporter)) {
311 return false;
312 }
313 }
314 return true;
315}
316
317// Verifies tensors have valid properties and legit buffer if set.
318bool VerifyTensors(const Model& model, ErrorReporter* error_reporter) {

Callers 1

VerifyFunction · 0.85

Calls 4

VerifyOperatorsFunction · 0.85
ReportErrorFunction · 0.70
operatorsMethod · 0.45

Tested by

no test coverage detected