我想从这里链接尝试通用句子编码器
这是我在 Ubuntu 18.04 和 Jupyter Notebook 上运行的代码
import tensorflow as tf
import tensorflow_hub as hub
embed = hub.Module("https://tfhub.dev/google/universal-sentence-encoder/2")
embeddings = embed([
"The quick brown fox jumps over the lazy dog.",
"I am a sentence for which I would like to get its embedding"])
print(session.run(embeddings))
它只是继续运行,没有任何事情发生。是不是在下载东西?我已经等了很长时间了。除了以下内容,它不显示任何内容:
WARNING: Logging before flag parsing goes to stderr.
W0517 09:23:47.724080 139743818422080 __init__.py:56] Some hub symbols are not available because TensorFlow version is less than 1.14
我检查了我的 tensorflow 安装。看起来不错。有任何故障排除建议吗?