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

Method GetMinimumRuntime

tensorflow/lite/model.cc:162–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162string FlatBufferModel::GetMinimumRuntime() const {
163 if (!model_ || !model_->metadata()) return "";
164
165 for (int i = 0; i < model_->metadata()->size(); ++i) {
166 auto metadata = model_->metadata()->Get(i);
167 if (metadata->name()->str() == "min_runtime_version") {
168 auto buf = metadata->buffer();
169 auto* buffer = (*model_->buffers())[buf];
170 auto* array = buffer->data();
171 return string(reinterpret_cast<const char*>(array->data()),
172 array->size());
173 }
174 }
175 return "";
176}
177
178bool FlatBufferModel::CheckModelIdentifier() const {
179 if (!tflite::ModelBufferHasIdentifier(allocation_->base())) {

Callers 1

TESTFunction · 0.80

Calls 6

metadataMethod · 0.80
nameMethod · 0.65
sizeMethod · 0.45
GetMethod · 0.45
bufferMethod · 0.45
dataMethod · 0.45

Tested by 1

TESTFunction · 0.64