【发布时间】:2019-06-19 22:06:12
【问题描述】:
我正在尝试使用 Tensorflow 模型(元图和检查点)恢复经过训练的生成对抗网络生成器
我是 tensorflow 和 python 的新手,所以我不确定我所做的是否有意义。已经尝试从元文件导入元图并从检查点恢复变量,但我确定下一步该做什么。我的目标是从最后一个检查点恢复经过训练的生成器,然后使用它从噪声输入中生成新数据。
这是包含模型文件的驱动器的链接: https://drive.google.com/drive/folders/1MaELMC4aOroSQlMJ32J3_ff3wxiBT_Fq?usp=sharing
到目前为止,我已经尝试了以下方法,它似乎正在加载图表:
# import the graph from the file
imported_graph = tf.train.import_meta_graph("../../models/model-9.meta")
# list all the tensors in the graph
for tensor in tf.get_default_graph().get_operations():
print (tensor.name)
# run the session
with tf.Session() as sess:
# restore the saved vairable
imported_graph.restore(sess, "../../models/model-9")
但是,我不确定下一步该做什么。是否可以使用这些文件只运行经过训练的生成器?我怎样才能访问它?
【问题讨论】:
标签: python tensorflow neural-network generative-adversarial-network