一 、第一個TFnode
python3.6python
import tensorflow as tf瀏覽器
x=2
y=3
node1=tf.add(x,y,name='node1')
node2=tf.multiply (x,y,name='node2')
useless=tf.multiply (x,node1,name='useless')
z=tf.pow(node2,node1,name='z')
with tf.Session() as sess:
writer = tf.summary.FileWriter('./graphs',sess.graph)
print (sess.run(z))
writer.close()less
終端運行:code
python test.pyblog
tensorboard --logdir="./graphs" --port 6006ip
瀏覽器打開 http://desktop-lao31jb:6006 OK能夠看到TFBoardit
2、數據類型io
TF輸入輸出對接numpyclass