69 ESP_LOGE(TAG,
"Model data is null or too small");
74 if (memcmp(this->
data_ + 4,
"TFL3", 4) != 0) {
75 ESP_LOGE(TAG,
"Invalid TFLite model magic number");
82 memcpy(&root_offset, this->
data_,
sizeof(root_offset));
83 if (root_offset >= this->
size_) {
84 ESP_LOGE(TAG,
"TFLite model root offset is out of bounds");
88 const tflite::Model *model = tflite::GetModel(this->
data_);
89 if (model->version() != TFLITE_SCHEMA_VERSION) {
90 ESP_LOGE(TAG,
"TFLite model version mismatch (expected %d, got %d)", TFLITE_SCHEMA_VERSION, model->version());