Ubuntu下本人親測有效
- 下載 Anaconda
鏈接:http://pan.baidu.com/s/1c7Zkcu 密碼:ca9b - 命令及注釋
# 安裝 Anaconda
bash Anaconda3-4.3.0-Linux-x86_64.sh
# 創(chuàng)建一個 conda 環(huán)境,名稱為 tf
conda create -n tf -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
# To activate this environment
source activate tf
# 在 conda 環(huán)境 tf 中,安裝 tensorflow 及其依賴
conda install -y -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ tensorflow
- 入門參考 (tensorflow 譯文)
https://pan.baidu.com/s/1dF5ld3j 密碼: e2zt
# 書上的例子,很傻很簡單
$ python
>>> 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
>>>