Tensorflow渴望和Tensorboard图? [英] Tensorflow Eager and Tensorboard Graphs?

查看:89
本文介绍了Tensorflow渴望和Tensorboard图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在Tensorflow中查看Eager模式,想知道是否可以提取该图以在Tensorboard中使用.我了解Tensorflow Eager模式实际上没有用户必须创建的图形或会话系统.但是,据我了解,有一个隐藏的内幕.是否可以导出此隐藏的Graph和Session以在Tensorboard中支持可视图形视图?还是我需要将模型重做为执行的Graph/Session形式?

I'm currently looking over the Eager mode in Tensorflow and wanted to know if I can extract the graph to use in Tensorboard. I understand that Tensorflow Eager mode does not really have a graph or session system that the user has to create. However, from my understanding there is one under the hood. Could this hidden Graph and Session be exported to support a visual graph view in Tensorboard? Or do I need to redo my model into a Graph/Session form of execution?

推荐答案

不,默认情况下,没有图形或会话渴望执行,这就是它如此吸引人的原因之一.您将需要编写与图兼容的代码,并急于执行,以便在需要时以图模式编写网络图.

No, by default there is no graph nor sessions in eager executing, which is one of the reasons why it is so appealing. You will need to write code that is compatible with both graph and eager execution to write your net's graph in graph mode if you need to.

请注意,即使您可以在急切模式下使用Tensorboard以可视化方式显示摘要,但良好的tf.summary.FileWriter与急切执行不兼容:您需要改用tf.contrib.summary.create_file_writer(在图形模式下工作)也是如此,因此您不必更改代码.)

Note that even though you can use Tensorboard in eager mode to visualize summaries, good ol' tf.summary.FileWriter is incompatible with eager execution: you need to use tf.contrib.summary.create_file_writer instead (works in graph mode too, so you won't have to change your code).

这篇关于Tensorflow渴望和Tensorboard图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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