如何在张量流服务中使用其他令牌器(NLTK,Jiebe等)



最近,我一直在使用 estimator 来训练和部署一个 tensorflow 模型,但是当我使用 Tensorflow 服务部署模型(它是使用 estimatorserving_fn包括tf.py_func)导出的时,出现了一个错误(见下文)。

我在 Github 上发现了这个问题,说服务不支持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>

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

最新更新