【发布时间】:2023-03-21 21:08:01
【问题描述】:
我有一个 TFLite 模型。模型输入是一个 256x192 的图像,它被量化为 16 位。它是用这个转换器量化的:
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_model = converter.convert()
我正在尝试将其加载到我的 android 应用程序中,并在执行 tflite = new Interpreter(tfliteModel, tfliteOptions); 时遇到以下问题:
E/AndroidRuntime: FATAL EXCEPTION: CameraBackground
Process: android.example.com.tflitecamerademo, PID: 7943
java.lang.IllegalArgumentException: Internal error: Cannot create interpreter: Unimplemented data type FLOAT16 (1) in tensor
Unimplemented data type FLOAT16 (1) in tensor
我可以尝试什么来解决它?
谢谢
【问题讨论】:
标签: android android-studio tensorflow quantization tensorflow-lite