import tensorflow as tf
with tf.name_scope('graph') as scope:
matrix1 = tf.constant([[3., 3.]],name ='matrix1') #1 row by 2 column
matrix2 = tf.constant([[2.],[2.]],name ='matrix2') # 2 row by 1 column
product = tf.matmul(matrix1, matrix2,name='product')
sess = tf.Session()
writer = tf.summary.FileWriter("logs/", sess.graph)
init = tf.global_variables_initializer()
sess.run(init)
新生成的那个文件再这个python文件的文件夹下的logs子文件夹中
之后 再cmd 中输入
上面这一句一定要是在logs上一级文件夹下进行输入
然后在浏览器中输入 http:/zyr:6006 就可以看见啦