24得票4回答
使用Tensorflow Hub时,找不到SavedModel文件

当尝试使用来自tensorflow_hub的hub.load函数时,会出现“OSError: SavedModel file does not exist at:”错误。奇怪的是,它几天前还可以正常工作,所以我不太明白为什么现在会出现这个错误。 复现代码: import tensorflo...

23得票3回答
TensorFlow Hub模块能在TensorFlow 2.0中使用吗?

我尝试在TensorFlow 2.0(alpha)中运行以下代码: import tensorflow_hub as hub @tf.function def elmo(texts): elmo_module = hub.Module("https://tfhub.dev/goog...

14得票1回答
如何提供tensorflow模块,特别是通用句子编码器?

我花了几个小时来设置Tensorflow-hub模块的Tensorflow serving,"通用句子编码器"。这里有一个类似的问题:如何使用Tensorflow serving使Tensorflow hub嵌入可用? 我是在Windows机器上进行的操作。这是我用来构建模型的代码: imp...

12得票1回答
TensorFlow Hub在加载链接时出现错误:'SentencepieceOp'。

我正在尝试在PyCharm中运行以下代码,并且已安装和导入了tensorflow_hub。use = hub.load("https://tfhub.dev/google/universal-sentence-encoder-multilingual-large/3") 以...

11得票6回答
如何将TensorFlow Hub模块保存/加载到/自定义路径?

tensorflow_hub 库的维护者非常注重让用户可以轻松下载并使用预训练的tensorflow模块,例如:import tensorflow_hub as hub embed = hub.Module("https://tfhub.dev/google/universal-senten...

11得票1回答
模块未找到错误:没有名为“tensorflow_hub”的模块。

我按照TensorFlow网站上的说明安装了tensorflow_hub,并在conda环境中完成了安装。$ pip install "tensorflow>=2.0.0" $ pip install --upgrade tensorflow-hub 我在anacon...

9得票4回答
无法加载tensorflow_hub。

在写完"import tensorflow_hub"之后,出现了以下错误: class LatestModuleExporter(tf.estimator.Exporter): AttributeError: 模块 'tensorflow.python.estimator.estimat...

8得票4回答
是否有方法可以访问tensorflow_hub.KerasLayer对象中的层?

我正在尝试将TensorFlow Hub中的一个预训练模型用于我的目标检测模型。我按照官方指南将Hub中的模型封装为KerasLayer对象。但是,我发现我无法访问这个预训练模型中的层。但我需要使用来自某些特定层的输出来构建我的模型。有没有办法访问tensorflow_hub.KerasLay...

8得票2回答
使用Tensorflow Hub时出现作用域变量错误

我正在使用Colab来运行文本分析代码。我想从tensorflow_hub获取universal-sentence-encoder-large,但是每次运行包含下面代码块的程序时: module = hub.Module("https://tfhub.dev/google/universal...

8得票3回答
调用hub.text_embedding_column方法时如何解决"RuntimeError: Missing implementation that supports: loader"问题?

我正在尝试适应一个文本分类模型。因此,我想使用tensorflow-hub提供的text_embedding_column函数。不幸的是,我遇到了运行时错误。 import tensorflow_hub as hub embedded_text_feature_column = hub.te...