我试图在Windows中使用sentecepiece,同时在tensorflow中将通用语句编码器实现为所述。
但我的错误是:
RuntimeError: python注册表({'SentencepieceEncodeSparse'})中缺少的图形ops也没有出现在c++注册表中。
我知道现在支持这库:
我也尝试过用pip install --user sentencepiece安装pip install --user sentencepiece,并且有很多版本。我可以导入sentencepiece,但是RuntimeError: Graph ops missing from the python registry ({'SentencepieceEncodeSparse'})也不存在于C++注册表中。
我也尝试过安装tf_sentencepiece,但是它引发了一个错误:anaconda3\lib\site-packages\tf_sentencepiece\_sentencepiece_processor_ops。因此,它不是设计为在Windows上运行,就是包含一个错误。
NotFoundError Traceback (most recent call last)
<ipython-input-62-956b40af1330> in <module>
----> 1 import tf_sentencepiece
~\AppData\Local\Continuum\anaconda3\lib\site-packages\tf_sentencepiece\__init__.py in <module>
3 from __future__ import print_function
4
----> 5 from tf_sentencepiece.sentencepiece_processor_ops import *
~\AppData\Local\Continuum\anaconda3\lib\site-packages\tf_sentencepiece\sentencepiece_processor_ops.py in <module>
25
26 _gen_sentencepiece_processor_op = tf.load_op_library(
---> 27 os.path.join(os.path.dirname(__file__), '_sentencepiece_processor_ops.so'))
28
29
~\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\framework\load_library.py in load_op_library(library_filename)
59 RuntimeError: when unable to load the library or get the python wrappers.
60 """
---> 61 lib_handle = py_tf.TF_LoadLibrary(library_filename)
62
63 op_list_str = py_tf.TF_GetOpList(lib_handle)
NotFoundError: C:\Users\AUSER\AppData\Local\Continuum\anaconda3\lib\site-packages\tf_sentencepiece\_sentencepiece_processor_ops.so not found发布于 2019-07-17 12:50:23
您必须将TensorFlow版本降到1.13.1。你可以在谷歌的github页面上看到:句式
(看描述)
https://stackoverflow.com/questions/56748184
复制相似问题