Но при использовании этой модели для обнаружения объектов можно выполнить вывод по одному изображению, используя следующий код:
Код: Выделить всё
interpreter = tf.lite.Interpreter(model_path)
Код: Выделить всё
ValueError Traceback (most recent call last)
in
----> 1 interpreter = tf.lite.Interpreter("/home/sushanth/Documents /nuts_poc/tflite_od/nam_model_quantized.lite")
2 interpreter.allocate_tensors()
3 input_details = interpreter.get_input_details()
4 output_details = interpreter.get_output_details()
5 input_tensor_index = interpreter.get_input_details()[0]["index"]
~/.local/lib/python3.7/site-packages/tensorflow/lite/python/interpreter.py in __init__(self, model_path, model_content)
75 self._interpreter = (
76 _interpreter_wrapper.InterpreterWrapper_CreateWrapperCPPFromFile(
---> 77 model_path))
78 if not self._interpreter:
79 raise ValueError('Failed to open {}'.format(model_path))
ValueError: Op builtin_code out of range: 117. Are you using old TFLite binary with newer model?Registration failed.
Версия Tensorflow: 1.1.4
ОС: Ubuntu 18.04
Как решить эту проблему?
Версия Tensorflow: 1.1.4
ОС: Ubuntu 18.04
Python: 3.7
PS: я преобразовал модель классификатора (inception_v2) в tflite и использовал приведенный выше код («interpreter = tf.lite.Interpreter( model_path)") без ошибок!
Подробнее здесь: https://stackoverflow.com/questions/586 ... tion-model