1.先上代碼,基礎 hello world
#-*- coding:UTF-8 -*-
import tensorflow as tf #導入模塊
val = tf.constant("hello world") #定義 tf 常量 val
sess = tf.Session() # 創建運算圖
print(sess.run(val)) #啓動運算圖 並打印結果
sess.close() #關閉運算圖
1.先上代碼,基礎 hello world
#-*- coding:UTF-8 -*-
import tensorflow as tf #導入模塊
val = tf.constant("hello world") #定義 tf 常量 val
sess = tf.Session() # 創建運算圖
print(sess.run(val)) #啓動運算圖 並打印結果
sess.close() #關閉運算圖