测试模型而不先保存模型

时间:2019-01-12 09:38:07

标签: tensorflow

运行此代码时,为什么会收到警告:“未创建保护程序?”

sentences=['this is one', 'this is two', 'and this is three']

import tensorflow as tf
import tensorflow_hub as hub
url = "https://tfhub.dev/google/elmo/2"
embed = hub.Module(url)
embeddings = embed(sentences, signature="default", as_dict=True)["default"]

INFO:tensorflow:Saver not created because there are no variables in the graph to restore

我不想保存任何东西。不能保存就不能测试模型吗?

1 个答案:

答案 0 :(得分:-1)

这只是一个“信息”,而不是“警告”。只需忽略它,就没有任何区别。