| 176 | } |
| 177 | |
| 178 | bool 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 | |
| 189 | FlatBufferModel::FlatBufferModel(const Model* model, |
| 190 | ErrorReporter* error_reporter) |
nothing calls this directly
no test coverage detected