Tensorflow--gpu版安装
2018-09-13 本文已影响0人
DonkeyJason
配置基于cpu加速的tensorflow环境
--cuda 8,cudnn6,tensorflow-gpu-1.3
1.准备安装包(见文件夹)
vc_redist.x64.exe
cuda_8.0.44_win10.exe
cudnn-8.0-windows10-x64-v6.0.zip
tensorflow_gpu-1.3.0rc0-cp35-cp35m-win_amd64.whl
curses-2.2-cp35-none-win_amd64.whl
2.安装(nvidia库部分)
0)请更新nvidia显卡驱动至最新版
1)安装vc_redist.x64.exe
2)安装CUDA cuda_8.0.44_win10.exe
选择自定义安装,只选cuda相关即可
装完后在cmd里查看版本号:nvcc -V

3.安装cuDNN库cudnn-8.0-windows10-x64-v6.0.zip
1)直接解压,然后把解压文件放置到CUDA的相关文件夹里:如图拷贝同名文件夹下的所有文件(从cudnn至cuda)


2)并将这些路径添加至path 环境变量
a.打开电脑--->在电脑桌面上--->右击--->我的电脑--->选择属性

b.在我的电脑属性中--->左侧--->高级系统设置
--->系统属性对话框

c.点击环境变量--->在系统变量中找到--->path--->编辑

4.安装(python环境部分)
注意:请把curses-2.2-cp35-none-win_amd64.whl和 tensorflow_gpu-1.3.0rc0-cp35-cp35m-win_amd64.whl 放在anaconda命令行的指定目录下 如

放在 c user xx 下即可
执行命令
conda create -n tflearn-gpu python=3.5
activate tflearn-gpu
conda install numpy pandas jupyter notebook matplotlib
conda install scipy h5py
pip install tensorflow_gpu-1.3.0rc0-cp35-cp35m-win_amd64.whl
pip install TFLearn
pip install curses-2.2-cp35-none-win_amd64.whl

5.测试
打开notebook
import tensorflow as tf
hello = tf.constant("Hello!TensorFlow")
sess = tf.Session()
print(sess.run(hello))

见到b'Hello TensorFlow' 测试成功。
祝你好运!
文件资源链接
密码:3n07