CentOS7 安裝 tensorflow 0.8

1、確認python爲2.7.0以上版本

python -V


2、安裝

pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl


3、測試hello world

vim tf_hello.py


import tensorflow as tf

sess = tf.Session()

a = tf.constant(100)

b = tf.constant(20)

print sess.run(a+b)


4、執行hello world

python tf_hello.py

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章