RuntimeError: Encountered unresolved custom op: Normalize.Node number 0 (Normalize) failed to prepare

喜你入骨 提交于 2020-08-26 07:19:27

问题


I'm trying to implement smart reply https://www.tensorflow.org/lite/models/smart_reply/overview concept in Python. You can download tflite model file here 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()

While using above code, i'm getting this error,

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.

Thanks a lot in advance!

来源:https://stackoverflow.com/questions/59627407/runtimeerror-encountered-unresolved-custom-op-normalize-node-number-0-normali

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!