0
這些是示例代碼。tensorflow .graph文件不生成
import tensorflow as tf
const1 = tf.constant(2)
const2 = tf.constant(3)
add_op = tf.add(const1,const2)
mul_op = tf.mul(add_op,const2)
with tf.Session() as sess:
result,result2 = sess.run([mul_op,add_op])
print(result)
print(result2)
tf.train.SummaryWriter('./',sess.graph)
它顯示這樣的消息,
Tensor("Add:0", shape=(), dtype=int32)
但是沒有產生文件。
謝謝我的版本是0.10rc,所以我會更新版本1 – whitebear