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

Method CheckModelIdentifier

tensorflow/lite/model.cc:178–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178bool FlatBufferModel::CheckModelIdentifier() const {
179 if (!tflite::ModelBufferHasIdentifier(allocation_->base())) {
180 const char* ident = flatbuffers::GetBufferIdentifier(allocation_->base());
181 error_reporter_->Report(
182 "Model provided has model identifier '%c%c%c%c', should be '%s'\n",
183 ident[0], ident[1], ident[2], ident[3], tflite::ModelIdentifier());
184 return false;
185 }
186 return true;
187}
188
189FlatBufferModel::FlatBufferModel(const Model* model,
190 ErrorReporter* error_reporter)

Callers

nothing calls this directly

Calls 4

ModelBufferHasIdentifierFunction · 0.85
ModelIdentifierFunction · 0.85
baseMethod · 0.45
ReportMethod · 0.45

Tested by

no test coverage detected