【问题标题】:Not able to load universal-sentence-encoder-large/3 on MAC from local cache无法从本地缓存在 MAC 上加载 Universal-sentence-encoder-large/3
【发布时间】:2019-01-15 14:20:31
【问题描述】:

在运行以下程序以加载 Universal-sentence-encoder-large/3 时 得到以下错误

import tensorflow_hub as hub
m = hub.Module("tensorflow_objects/USEL3")

以下是错误日志

INFO:tensorflow:Using /var/folders/lb/qcf6q0rd29g422mh1gst4k2r0000gn/T/tfhub_modules to cache modules.
INFO:tensorflow:Op RegexReplace is missing from both the python and C++ registry.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyenv/lib/python2.7/site-packages/tensorflow_hub/module.py", line 126, in __init__
    tags=self._tags)
  File "pyenv/lib/python2.7/site-packages/tensorflow_hub/native_module.py", line 282, in _create_impl
    name=name)
  File "pyenv/lib/python2.7/site-packages/tensorflow_hub/native_module.py", line 325, in __init__
    op.name for op in self._meta_graph.meta_info_def.stripped_op_list.op})
  File "pyenv/lib/python2.7/site-packages/tensorflow_hub/native_module.py", line 712, in register_ops_if_needed
    % missing_ops.difference(set(cpp_registry_ops.keys())))
RuntimeError: Graph ops missing from the python registry (set([u'RegexReplace'])) are also absent from the c++ registry

【问题讨论】:

    标签: macos python-2.7 tensorflow tensorflow-hub


    【解决方案1】:

    这可能意味着您运行的是较旧的 tensorflow 版本。

    【讨论】:

    • @André Susano Pinto 谢谢你的回答,我用的是 tensorflow 1.6,升级到 1.8 就可以了
    猜你喜欢
    • 1970-01-01
    • 2021-12-25
    • 1970-01-01
    • 1970-01-01
    • 2020-11-19
    • 2020-01-30
    • 2021-05-07
    • 2020-05-26
    • 2022-07-23
    相关资源
    最近更新 更多