Select TensorFlow op(s), included in the given model, is(are) not supported by this interpreter
utkukozan opened this issue · comments
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.