最近,我一直在使用 estimator 来训练和部署一个 tensorflow 模型,但是当我使用 tensorflow seving 部署模型(它是使用 estimator include 导出的serving_fn
)tf.py_func
时,出现了错误(见下文)。
我在 Github 上发现了这个问题,说 service can't support tf.py_func
。
任何人都可以帮忙吗?
我想使用其他实现令牌功能tokenlizer(NLTK,Jieba)
。
错误:
Invalid argument: No OpKernel was registered to support Op 'PyFunc' used by {{node map/while/PyFunc}}with these attrs: [Tout=[DT_STRING], token="pyfunc_4", _output_shapes=[<unknown>], Tin=[DT_STRING]]
Registered devices: [CPU]
Registered kernels:
<no registered kernels>