TFLITE_FLEX_MISSING
tensorflow
build_error
ai_generated
true
RuntimeError: TFLite 解释器创建失败:找不到 Flex 委托。确保 TensorFlow Lite Flex 委托已链接。
RuntimeError: TFLite interpreter failed to create: Could not find the Flex delegate. Ensure the TensorFlow Lite Flex delegate is linked.
ID: tensorflow/tflite-flex-delegate-not-found
78%修复率
84%置信度
1证据数
2024-04-12首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| tensorflow==2.16.1 | active | — | — | — |
| tflite-runtime==2.16.0 | active | — | — | — |
根因分析
TFLite 模型使用了需要 Flex 委托的 TensorFlow 算子,但解释器构建时未包含 Flex 支持或未加载委托库。
English
The TFLite model uses TensorFlow ops that require the Flex delegate, but the interpreter was built without Flex support or the delegate library is not loaded.
官方文档
https://www.tensorflow.org/lite/guide/ops_select解决方案
-
Install the full TensorFlow package which includes the Flex delegate, or build TFLite with Flex support enabled.
-
Convert the TFLite model without TensorFlow ops by replacing them with native TFLite ops before conversion.
无效尝试
常见但无效的做法:
-
85% 失败
Installing tflite-runtime without the Flex delegate package (tflite-support) does not resolve the missing delegate.
-
70% 失败
Enabling XNNPACK delegate only accelerates certain ops but does not provide Flex support for TensorFlow ops.