# RuntimeError: TFLite 解释器创建失败：找不到 Flex 委托。确保 TensorFlow Lite Flex 委托已链接。

- **ID:** `tensorflow/tflite-flex-delegate-not-found`
- **领域:** tensorflow
- **类别:** build_error
- **错误码:** `TFLITE_FLEX_MISSING`
- **验证级别:** ai_generated
- **修复率:** 78%

## 根因

TFLite 模型使用了需要 Flex 委托的 TensorFlow 算子，但解释器构建时未包含 Flex 支持或未加载委托库。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| tensorflow==2.16.1 | active | — | — |
| tflite-runtime==2.16.0 | active | — | — |

## 解决方案

1. ```
   Install the full TensorFlow package which includes the Flex delegate, or build TFLite with Flex support enabled.
   ```
2. ```
   Convert the TFLite model without TensorFlow ops by replacing them with native TFLite ops before conversion.
   ```

## 无效尝试

- **** — Installing tflite-runtime without the Flex delegate package (tflite-support) does not resolve the missing delegate. (85% 失败率)
- **** — Enabling XNNPACK delegate only accelerates certain ops but does not provide Flex support for TensorFlow ops. (70% 失败率)
