win7下cuda8.0安装跑gpu版tensorflow
来源:互联网 发布:网络红人毒药身世 知乎 编辑:程序博客网 时间:2024/05/16 03:24
要用深度学习做目标检测,先尝试了caffe,这会又要熟悉tensorflow了,简单写下配置过程吧,挺简单的:
0.win7 X64系统
1.安装vs2013
2.安装Anaconda3(需要里面的python环境)
3.下载CUDA8.0(https://developer.nvidia.com/cuda-downloads),下面两个exe文件都下载
补充说明:我电脑里原来是cuda7.5,故需要先卸载干净,我是这么做的,有需要的可以借鉴:
(1)把下图中的几项用电脑管家全部卸载干净
(2)删除C:\Program Files\NVIDIA GPU Computing Toolkit 文件夹
删除 C:\ProgramData\NVIDIA GPU Computing Toolkit 文件夹
删除C:\ProgramData\NVIDIA Corporation\CUDA Samples 文件夹
4.运行exe
默认下一步到最后
5.再运行exe
默认下一步到最后
6.下载cuddn5.1(如果想要了解cuddn和cuda的区别可以看该博客http://blog.csdn.net/fangjin_kl/article/details/53906874
7.解压cuddn5.1,把如下的三个文件夹替换到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0夹下(该目录是我的cuda8.0的安装目录)
这里需要在系统变量里设置下面几个变量:
CUDA_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0
CUDA_BIN_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin
CUDA_LIB_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64
CUDA_PATH_V8_0: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0
CUDA_SDK_BIN_PATH: C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0\bin\win64
CUDA_SDK_LIB_PATH: C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0\common\lib\x64
CUDA_SDK_PATH: C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0
8.查看cuda8.0是否安装成功,可以在CMD窗口下敲指令nvcc -V
9.再运行一个Sample例子 打开C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0\1_Utilities\deviceQuery解决方案,编译下,出来的结果为
补充说明:到这说明cuda的环境基本配好了,该笔记本也是支持GPU加速的,可以玩tensorflow gpu版的了
中间我报过这个问题,发现是我的显卡驱动被卸载了,设备管理器找不到了
10.pip安装tensorflow gpu库(http://blog.csdn.net/u014365862/article/details/53868578)
在Anaconda Prompt里输入(不是cmd跳出的窗口内输入) pip install tensorflow-gpu
11.安装完后输入import tensorflow试试
13.我的独立显卡是
NVIDIA GeForce 830M, 是可以支持GPU加速的(大家有配不了的时候,别着急,好好分析下原因)
14.提醒下:
显卡驱动请用驱动精灵升级到最新版,不然可能会报如下错误: CUDA driver version is insufficient for CUDA runtime version
15.打开Pycharm,输入
# python 3.5.3import tensorflow as tfa = tf.constant([1.0, 2.0, 3.0], shape=[3], name='a')b = tf.constant([1.0, 2.0, 3.0], shape=[3], name='b')c = a + bsess = tf.Session(config = tf.ConfigProto(log_device_placement=True))print(sess.run(c))结果:"C:\Program Files\Anaconda3\python.exe" C:/Users/icecream.shao/Desktop/tensorflow-fcn-master1/ceshi.py2017-07-30 11:14:08.516152: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.2017-07-30 11:14:08.516152: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.2017-07-30 11:14:08.516152: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.2017-07-30 11:14:08.517152: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.2017-07-30 11:14:08.517152: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.2017-07-30 11:14:08.517152: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.2017-07-30 11:14:08.517152: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.2017-07-30 11:14:08.517152: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.2017-07-30 11:14:09.028203: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:940] Found device 0 with properties: name: GeForce 830Mmajor: 5 minor: 0 memoryClockRate (GHz) 1.15pciBusID 0000:03:00.0Total memory: 2.00GiBFree memory: 1.94GiB2017-07-30 11:14:09.028203: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:961] DMA: 0 2017-07-30 11:14:09.028203: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:971] 0: Y 2017-07-30 11:14:09.028203: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce 830M, pci bus id: 0000:03:00.0)2017-07-30 11:14:09.216222: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\direct_session.cc:265] Device mapping:/job:localhost/replica:0/task:0/gpu:0 -> device: 0, name: GeForce 830M, pci bus id: 0000:03:00.0Device mapping:/job:localhost/replica:0/task:0/gpu:0 -> device: 0, name: GeForce 830M, pci bus id: 0000:03:00.0add: (Add): /job:localhost/replica:0/task:0/gpu:0b: (Const): /job:localhost/replica:0/task:0/gpu:0a: (Const): /job:localhost/replica:0/task:0/gpu:02017-07-30 11:14:09.219222: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\simple_placer.cc:847] add: (Add)/job:localhost/replica:0/task:0/gpu:02017-07-30 11:14:09.219222: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\simple_placer.cc:847] b: (Const)/job:localhost/replica:0/task:0/gpu:02017-07-30 11:14:09.219222: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\simple_placer.cc:847] a: (Const)/job:localhost/replica:0/task:0/gpu:0[ 2. 4. 6.]Process finished with exit code 0
- win7下cuda8.0安装跑gpu版tensorflow
- Win10下安装Tensorflow(GPU)+CUDA8.0+cudnn6
- Win10下安装Tensorflow(GPU)+CUDA8.0+cudnn6
- Win10下安装Tensorflow(GPU)+CUDA8.0+cudnn6
- window10下安装Theano-GPU与Tensorflow-GPU(提供cuda8.0,cudnn6.0下载)
- Ubuntu16.04下安装Cuda8.0+Caffe+TensorFlow-gpu+Pycharm过程(Simple)
- ubuntu14.04下CUDA8.0+cuDNN+tensorflow(with gpu support)安装教程
- windows 10 64bit下安装Tensorflow+Keras+VS2015+CUDA8.0 GPU加速
- ubantu16.04安装tensorflow(GPU)+cuda8.0+cudnn6.0
- win10+anaconda2+cuda8.0+cudnn6.0安装tensorflow-gpu
- win10+cuda8.0+cudnn+Tensorflow(GPU)安装
- buntu16.04 源码安装CUDA8.0 tensorflow GPU 踩坑记
- win10+cuda8.0+cudnn+Tensorflow(GPU)安装
- win7安装tensorflow-gpu版(Anaconda)
- win7系统安装GPU/CPU版tensorflow
- Win7下VS2010安装CUDA8.0
- ubuntu14.04安装GPU驱动、CUDA8.0、cudnn5、anaconda、tensorflow(GPU)
- win7安装cuda8.0
- Python的ASCII, GB2312, Unicode , UTF-8 相互转换
- shell命令--cp
- ubuntu下qt-creator不支持写中文注释
- 3种方法解决交换两个数
- A
- win7下cuda8.0安装跑gpu版tensorflow
- LED灯
- HDU
- Android线程池的入门
- js将object转为json数据格式(java)
- 17暑假多校联赛1.3 HDU 6035 Colorful Tree
- Spring MVC文件上传下载(亲测可用)
- POJ
- 常用Java虚拟机调试和配置参数