保存 Tensorflow 图以在 Tensorboard 中查看,无需汇总操作 [英] Save Tensorflow graph for viewing in Tensorboard without summary operations

查看:25
本文介绍了保存 Tensorflow 图以在 Tensorboard 中查看,无需汇总操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相当复杂的 Tensorflow 图,我想将其可视化以进行优化.有没有我可以调用的函数,它可以简单地保存图形以在 Tensorboard 中查看而无需注释变量?

I have a rather complicated Tensorflow graph that I'd like to visualize for optimization purposes. Is there a function that I can call that will simply save the graph for viewing in Tensorboard without needing to annotate variables?

我试过这个:

merged = tf.merge_all_summaries()
writer = tf.train.SummaryWriter("/Users/Name/Desktop/tf_logs", session.graph_def)

但是没有产生任何输出.这是使用0.6轮.

But no output was produced. This is using the 0.6 wheel.

这似乎是相关的:seq2seq 模型的张量板中未显示图形可视化

推荐答案

为了提高效率,tf.train.SummaryWriter 异步记录到磁盘.为确保图表出现在日志中,您必须调用 close()flush() 在程序退出之前在 writer 上.

For efficiency, the tf.train.SummaryWriter logs asynchronously to disk. To ensure that the graph appears in the log, you must call close() or flush() on the writer before the program exits.

这篇关于保存 Tensorflow 图以在 Tensorboard 中查看,无需汇总操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆