官網:http://tensorflow.org/
安裝步驟:
一、sudo apt-get install python-pip python-dev python-virtualenvpython
二、virtualenv --system-site-packages ~/tensorflowlinux
三、cd ~/tensorflowbash
四、source bin/activate # If using bash測試
五、(tensorflow)$ pip install --upgrade tensorflow-0.5.0-cp27-none-linux_x86_64.whl命令行
測試:ip
一、打開終端輸入cd tensorflowget
二、source bin/activateit
三、pythonpip
四、輸入python後輸入如下示例io
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print sess.run(hello)
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print sess.run(a+b)
42
>>>
五、測試成功接下來首先退出python 按快捷鍵Ctrl+D
六、再退出tensorflow 在命令行輸入命令:deactivate