flutter-tflite
flutter-tflite copied to clipboard
Select TensorFlow op(s), included in the given model, is(are) not supported by this interpreter
I am getting this error when i am using my custom tflite model which detects pose and running in python successfully. My app level build.gradle file contains:
dependencies {
implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly-SNAPSHOT'
implementation 'org.tensorflow:tensorflow-lite-select-tf-ops:0.0.0-nightly-SNAPSHOT'
}
defaultConfig {
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
}
}
aaptOptions {
noCompress 'tflite'
noCompress 'lite'
}
And when i tried to initialize this model with this code :
tfl.Interpreter? interpreter = await tfl.Interpreter.fromAsset('assets/ml/model.tflite');
I am getting this 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
Node number 3 (FlexTensorListReserve) failed to prepare.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: failed precondition
Also my python TFLite convert method includes supported ops that see in tensorflow documents
converter.target_spec.supported_ops = [
tf.lite.OpsSet.TFLITE_BUILTINS, # enable TensorFlow Lite ops.
tf.lite.OpsSet.SELECT_TF_OPS # enable TensorFlow ops.
]
Could you please help me for solve this problem ?
Hey, I have the same issue, have you already resolved it?
Hey, I have the same issue, have you already resolved it?
No unfortunately I couldn't solve it
This is because this library does not currently support Flex delegate.
same problem
Can we add support for the flex delegate? How would we go about doing it?
same problem +1 who can share the answer, thanks
Can we add support for the flex delegate? How would we go about doing it?
So this is a 'new feature' or 'enhancement' or 'wish list' type issue rather than a bug-issue? If you think this is a bug, a failing test case (aligned with the existing tests) would be useful to demonstrate the bug. Does the documentation clearly state this unsupportiveness? The contributions to the documentation are invaluable. Can someone with the permissions add appropriate label(s) to this issue?
Ilooked it up, but I still can't find the answer. Has anyone solved it?
+1 Same problem with me
Node number 47 (FlexMatMul) failed to prepare.