-1

最近,我一直在使用 estimator 来训练和部署一个 tensorflow 模型,但是当我使用 tensorflow seving 部署模型(它是使用 estimator include 导出的serving_fntf.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>
4

1 回答 1

1

您是否尝试过使用 tensorflow 原生分词器,例如。见https://www.tensorflow.org/beta/tutorials/tensorflow_text/intro#tokenization

于 2019-06-25T22:24:02.913 回答