我正在尝试使用Coral Dev Board Mini上的YAMNET model made for the Coral Board,但无法使其工作,因为我遇到以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mendel/classifier_env/lib/python3.7/site-packages/tflite_runtime/interpreter.py", line 207, in __init__
custom_op_registerers_by_func))
ValueError: Op builtin_code out of range: 131. Are you using old TFLite binary with newer model?Registration failed.
我正在使用的代码片段是:
import tflite_runtime.interpreter as tflite
delegate = tflite.load_delegate('libedgetpu.so.1')
interpreter = tflite.Interpreter(model_path='coral_yamnet.tflite', experimental_delegates=[delegate])
如果我不使用委托,我会得到同样的错误
我的tflite_runtime
版本是:
>>> pip show tflite_runtime
Name: tflite-runtime
Version: 2.5.0
Summary: TensorFlow Lite is for mobile and embedded devices.
Home-page: https://www.tensorflow.org/lite/
Author: Google, LLC
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /home/mendel/classifier_env/lib/python3.7/site-packages
Requires: numpy
Required-by:
我使用的是Python 3.7.3
我也试着在我的电脑上用tensorflow.lite.Interpreter
但是我得到了同样的问题。我已经在互联网上搜索过了,但是我尝试过的都没有成功
你知道为什么会出现这个问题吗
请使用TensorFlow pip的匹配版本,该版本用于TFLite转换,而不是您案例中的TFLite_运行库
上述tflite_运行时包与用于tflite转换的TensorFlow版本不一致
相关问题 更多 >
编程相关推荐