RuntimeError: Обнаружена неразрешенная пользовательская операция: Normalize.Node number 0 (Normalize) не удалось подготовить - PullRequest
0 голосов
/ 07 января 2020

Я пытаюсь реализовать концепцию умного ответа https://www.tensorflow.org/lite/models/smart_reply/overview в Python. Вы можете скачать файл модели tflite здесь https://storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip.

import numpy as np
import tensorflow as tf
interpreter = tf.lite.Interpreter(model_path="smartreply.tflite")
interpreter.allocate_tensors()

При использовании приведенного выше кода, я получаю эту ошибку,

Traceback (most recent call last):
  File "smart_reply.py", line 6, in <module>
    interpreter.allocate_tensors()
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/lite/python/interpreter.py", line 244, in allocate_tensors
    return self._interpreter.AllocateTensors()
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/lite/python/interpreter_wrapper/tensorflow_wrap_interpreter_wrapper.py", line 106, in AllocateTensors
    return _tensorflow_wrap_interpreter_wrapper.InterpreterWrapper_AllocateTensors(self)
RuntimeError: Encountered unresolved custom op: Normalize.Node number 0 (Normalize) failed to prepare.

Большое спасибо заранее!

...