1. 程式人生 > >1.從helloworld談起

1.從helloworld談起

per pri operation print light class clas constant ant

import tensorflow as tf

# 創建一個常量,operation(操作)
hw = tf.constant(‘hello world,i love tensorflow‘)

# 創建一個會話
sess = tf.Session()

# 運行graph(計算圖)
print(sess.run(hw))

# 關閉session會話
sess.close()

  

b‘hello world,i love tensorflow‘

  

1.從helloworld談起