macos - 无法从本地缓存在 MAC 上加载 Universal-sentence-encoder-large/3
问题描述
在运行以下程序以加载 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
解决方案
这可能意味着您正在运行较旧的 tensorflow 版本。
- RegexReplace 在tensorflow-1.7中添加。
推荐阅读
- regex - 正则表达式替换第 n 次出现的下划线字符串
- java - Android Java - Firebase 中的 .getDownloadUrl().toString() 返回“com.google.android.gms.tasks.zzu@9501820”如何使用它来加载图像?
- java - 棋盘游戏的极小极大搜索中的状态维护出错
- laravel - laravel 通过索引访问一个雄辩的行数据
- python - 带有 Python 3 和 Flask 的 Google App Engine 标准环境:(非)POST 请求的高延迟
- python - 从列表中的一个值中删除小数
- asynchronous - F# CancellationTokenSource.Cancel() 不取消底层工作
- laravel - 此路由不支持 POST 方法。支持的方法:GET,HEAD,如何解决这个错误?我正在使用 vue js 和 laravel 7
- oracle - 单个页面中的多个可刷新选择列表
- java - Weblogic 类加载器问题