无法在张量板上可视化图形
Unable to visualize graph in tensorboard
写摘要时,
summary_writer1 = tf.train.SummaryWriter(logs_path, graph=tf.get_default_graph())
工作正常并在 tensorboard 上生成图表但做
summary_writer2 = tf.train.SummaryWriter(logs_path, sess.graph())
在 运行 训练模型的代码时产生以下错误,
Traceback (most recent call last):
File "MultiLayerPerceptron.py", line 121, in <module>
summary_writer2 = tf.train.SummaryWriter(logs_path, graph=sess.graph())
TypeError: 'Graph' object is not callable
还有 summary_writer1
中的默认图表和 summar_writer2
中的图表有什么区别
默认图表和 sess.graph
之间没有区别,它们是完全相同的图表。
错误很明显:
'Graph' object is not callable
会话对象有一个graph
成员,而不是图方法。
只需从 graph=sess.graph()
中删除 ()
,一切都会如您所愿。
写摘要时,
summary_writer1 = tf.train.SummaryWriter(logs_path, graph=tf.get_default_graph())
工作正常并在 tensorboard 上生成图表但做
summary_writer2 = tf.train.SummaryWriter(logs_path, sess.graph())
在 运行 训练模型的代码时产生以下错误,
Traceback (most recent call last):
File "MultiLayerPerceptron.py", line 121, in <module>
summary_writer2 = tf.train.SummaryWriter(logs_path, graph=sess.graph())
TypeError: 'Graph' object is not callable
还有 summary_writer1
中的默认图表和 summar_writer2
默认图表和 sess.graph
之间没有区别,它们是完全相同的图表。
错误很明显:
'Graph' object is not callable
会话对象有一个graph
成员,而不是图方法。
只需从 graph=sess.graph()
中删除 ()
,一切都会如您所愿。