歡迎關(guān)注本專欄《TensorFlow & AI 學(xué)習(xí)專欄》
創(chuàng)建虛擬機(jī)環(huán)境(這個(gè)步驟可以跳過)
mkvirtualenv tensorflow
pip 安裝 tensorflow
pip3 install -i https://pypi.douban.com/simple tensorflow
運(yùn)行效果
import tensorflow as tf
a = tf.constant(1.0)
b = tf.constant(2.0)
c=a+ b
sess = tf.Session()
print(sess.run(c))