问题描述
限时送ChatGPT账号..我有一个相当复杂的 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屋!
更多推荐
[db:关键词]
发布评论