mocleiri / tensorflow-micropython-examples

A custom micropython firmware integrating tensorflow lite for microcontrollers and ulab to implement the tensorflow micro examples.
MIT License
170 stars 79 forks source link

Didn't find op for builtin opcode 'RANGE' version '1' #81

Open MATTYGILO opened 2 years ago

MATTYGILO commented 2 years ago

When I load my model into the interpreter I get this error

Error in the comment below

MATTYGILO commented 2 years ago
Didn't find op for builtin opcode 'RANGE' version '1'. An older version of this builtin might be supported. Are you using an old TFLite binary with a newer model?

Failed to get registration from op code RANGE

AllocateTensors() failed!
mocleiri commented 2 years ago

I think this means your model is using an op not supported in tflite micro.

Here is the list of ops included: https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/all_ops_resolver.cc

There is no range op.

Look at you model in netron and double check each op is supported and if not then you need to adjust your model to only have compatible ops.

There may also be options to request the op to be added upstream or to port it to tflm yourself.

https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/docs/porting_reference_ops.md