tflite_flutter_plugin icon indicating copy to clipboard operation
tflite_flutter_plugin copied to clipboard

I have error when I build object detection desktop app

Open leduytuanvu opened this issue 1 year ago • 2 comments

ERROR: Select TensorFlow op(s), included in the given model, is(are) not supported by this interpreter. Make sure you apply/link the Flex delegate before inference. For the Android, it can be resolved by adding "org.tensorflow:tensorflow-lite-select-tf-ops" dependency. See instructions: https://www.tensorflow.org/lite/guide/ops_select ERROR: Node number 5 (FlexTensorArrayV3) failed to prepare.

leduytuanvu avatar Apr 25 '23 09:04 leduytuanvu

@leduytuanvu there is a similar issue here.

As I understand it, there are two solutions to this problem.

The first solution is to rebuild the binaries (for android) and framework (for IOS) from the tensorflow source code, adding support for flex. (Or you can try the binaries from this answer).

The second solution is to change the model and remove all flex functions from it. In my case, it didn't work until I replaced these binaries with different ones. Or, again, you can create new binaries from the tensorflow source code. But I didn't understand how to do it.

update: I just saw that your question is related to desktop. My answer is more about mobile devices. But I hope it will still be useful to you.

Alexi-Zemcov avatar Apr 26 '23 07:04 Alexi-Zemcov

Anyway, thank you @Alexi-Zemcov

leduytuanvu avatar Apr 27 '23 01:04 leduytuanvu