有一種使用Python創建文件的方法,可以通過TensorBoard進行可視化(請參閱here)。我已經嘗試了這個代碼,它運行良好。在TensorFlow的C++ api中,如何使用張量板生成可視化的圖形文件?
import tensorflow as tf
a = tf.add(1, 2,)
b = tf.multiply(a, 3)
c = tf.add(4, 5,)
d = tf.multiply(c, 6,)
e = tf.multiply(4, 5,)
f = tf.div(c, 6,)
g = tf.add(b, d)
h = tf.multiply(g, f)
with tf.Session() as sess:
print(sess.run(h))
with tf.Session() as sess:
writer = tf.summary.FileWriter("output", sess.graph)
print(sess.run(h))
writer.close()
現在我使用TensorFlow API來創建我的計算。 如何用TensorBoard可視化我的計算?
在C++ api中還有一個FileWrite接口,但我還沒有看到任何示例。它是相同的界面?