標籤:註冊 evel 檔案 amd lan 本地 src ade pre
安裝環境
- Windows8.1
- python3.5.x(TensorFlow only supports version 3.5.x of Python on Windows)
- pip 9.0.1
- tensorflow-gpu-0.12.0
- cuda
cudnn
安裝過程
:https://www.python.org/
- 點擊Downloads下的Windows,本次選用了Python 3.5.2版本
選擇其中的第五個,Windows x86-64 executable installer下載安裝(安裝的時候最好把添加環境變數那個打鉤,這樣就不需要自己配置環境變數,後續的需要的地方都打鉤,一路next)
2. 升級pip
開啟cmd輸入
python.exe -m pip install --upgrade pip
(本次採用的線上安裝,也可以下載到本地,進行本地安裝)
安裝gpu版本
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0-cp35-cp35m-win_amd64.whl
安裝CPU版本
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0-cp35-cp35m-win_amd64.whl
查看你的gpu是否支援cuda
gpu版本要安裝gpu支援包(cuda8.0地址和cudnn5.1地址)
安裝cuda8.0
安裝對應的cudnn(這個貌似需要登入Nvdia帳號才能夠下載,我是先註冊的)
找到你需要的版本,下載cudnn壓縮檔後進行解壓,添加解壓後的bin目錄到PATH環境變數。
$ 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
Windows環境下的TensorFlow安裝過程