You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checked the issue tracker for similar issues to ensure this is not a duplicate
Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
Tested with the latest version to ensure the issue hasn't been fixed
How often does this bug occurs?
always
Expected behavior
As the title says, i create a project and run it, but an error occurs.
By the way, i want to know, which version of TensorFlow was used to convert the tflite model in these examples[helloworld/micro_speech/person_detection]?
Actual behavior (suspected bug)
The following is the code snippet of ESP:
voidsetup() {
// Map the model into a usable data structure. This doesn't involve any// copying or parsing, it's a very lightweight operation.model=tflite::GetModel(g_model);
if (model->version() !=TFLITE_SCHEMA_VERSION) {
MicroPrintf("Model provided is schema version %d not equal to supported ""version %d.", model->version(), TFLITE_SCHEMA_VERSION);
return;
}
// Pull in only the operation implementations we need.statictflite::MicroMutableOpResolver<2>resolver;
if (resolver.AddUnidirectionalSequenceLSTM() !=kTfLiteOk) {
return;
}
if (resolver.AddFullyConnected() !=kTfLiteOk) {
return;
}
// Build an interpreter to run the model with.statictflite::MicroInterpreterstatic_interpreter(
model, resolver, tensor_arena, kTensorArenaSize);
interpreter=&static_interpreter;
// Allocate memory from the tensor_arena for the model's tensors.TfLiteStatusallocate_status=interpreter->AllocateTensors();
if (allocate_status!=kTfLiteOk) {
MicroPrintf("AllocateTensors() failed");
return;
}
// Obtain pointers to the model's input and output tensors.input=interpreter->input(0);
output=interpreter->output(0);
}
The following is the code snippet of Python to build model and save to tflite:
Didn't find op for builtin opcode 'SHAPE'Failed to get registration from op code SHAPEAllocateTensors() failed
Steps to reproduce the behavior
The current environment is as follows:
esp-idf: 5.2.0
esp-tflite-micro: 1.3.2
chip: esp32-s3 16MFlash and 8M PSRAM
python: 3.10.0
tensorflow: 2.16.1
Project release version
1.3.2
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
Window11
Shell
ZSH
Additional context
No response
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Didn't find op for builtin opcode 'SHAPE' & Failed to get registration from op code SHAPE
Didn't find op for builtin opcode 'SHAPE' & Failed to get registration from op code SHAPE (TFMIC-42)
Nov 10, 2024
Once you quantise the model and embed it in the program, you can then pull the OPs used by the model. To know these OPs, you can take help of Netron visualiser or run the script to do this for you.
The model should now run without issues. If you want to manually do this, in your case, for example, you will at least need to add the SHAPE OP (shows in the error) additionally as follows:
// Pull in only the operation implementations we need.
static tflite::MicroMutableOpResolver<3> resolver; // 3 = Number of OPs to be registered
if (resolver.AddUnidirectionalSequenceLSTM() != kTfLiteOk) {
return;
}
if (resolver.AddFullyConnected() != kTfLiteOk) {
return;
}
if (resolver.AddShape() != kTfLiteOk) {
return;
}
Checklist
How often does this bug occurs?
always
Expected behavior
As the title says, i create a project and run it, but an error occurs.
By the way, i want to know, which version of TensorFlow was used to convert the tflite model in these examples[helloworld/micro_speech/person_detection]?
Actual behavior (suspected bug)
The following is the code snippet of ESP:
The following is the code snippet of Python to build model and save to tflite:
Error logs or terminal output
Steps to reproduce the behavior
The current environment is as follows:
esp-idf: 5.2.0
esp-tflite-micro: 1.3.2
chip: esp32-s3 16MFlash and 8M PSRAM
python: 3.10.0
tensorflow: 2.16.1
Project release version
1.3.2
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
Window11
Shell
ZSH
Additional context
No response
The text was updated successfully, but these errors were encountered: