首页 > 解决方案 > “WARNING:tensorflow:Passing a `GraphDef` to the SummaryWriter is deprecated”是什么意思?

问题描述

该警告背后的含义是什么?如果有人可以解释什么是 Graph 对象以及为什么不应该传递 sess.graph_def ,我会很高兴。

summary_writer = tf.summary.FileWriter('logistic_logs/',graph_def=sess.graph_def)

标签: tensorflow

解决方案


在 tensorflow 中,您曾经将操作定义为非循环计算图。随着 Tensorflow 2.0 的引入,我们不再有会话对象,并且与会话一起,包含所有操作的预定义完整图也消失了。您可以在 Eager Execution 下了解更多信息

您可以在此处了解有关 tensorflow 图以及如何可视化它们的更多信息。


推荐阅读