保存 Tensorflow 图以在 Tensorboard 中查看,无需汇总操作

编程入门 行业动态 更新时间:2024-10-09 15:17:27
本文介绍了保存 Tensorflow 图以在 Tensorboard 中查看,无需汇总操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送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:关键词]

本文发布于:2023-05-01 05:48:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1405374.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:操作   Tensorflow   Tensorboard

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!