TensorFlow的基礎概念01

概念:框架

TensorFlow是一個深度學習框架,人人都能實現機器學習。機器學習

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
#導入對應的TensorFlow


#輸出Hello World

#建立一個常值運算,將做爲一個節點加入到默認計算圖中
hello = tf.constant("Hello World")


#建立一個TF對話
sess = tf.Session()

#運行並得到結果
print(sess.run(hello))


#輸出  b'Hello World'   b表示的是字節
相關文章
相關標籤/搜索