windows10-cuda10.0-cudn7.3.1+tensorflow-gpu1.3.1安装

1.安装cuda之前首先安装vs2015,
安装vs2015教程

要保证有以下vs2015两个组件,如果安装vs2017, Microsoft Visual C++ 2015 Redistributable Update 3 x64组件会被系统删掉,它和Microsoft Visual C++ 2017 Redistributable Update 3 x64不兼容。所以建议安装vs2015,如果装了vs2017,该组件装不上。
We need Visual Studio 2015 stuffs here. If you have installed Visual Studio 2015 or 2017 no problem run the following setup and be okay with instructions on screen Goto https://visualstudio.microsoft.com/vs/older-downloads and move to end you will find “Redistributables and Build Tools” Download and install following

1. Microsoft Visual C++ 2015 Redistributable Update 3 x64
2. Microsoft Build Tools 2015 Update 3

2.安装cuda10.0
if you have already CUDA stuffs other than CUDA 10 then uninstall all one by one from control panel. Go to https://developer.nvidia.com/cuda-downloads and download Installer for Windows [your version][network]. For me, version is Windows 10. I recommend you to use network installer. Install it in default location with default settings. It will update your GPU driver if required.
安装cuda失败参考该教程
上述教程的校正
3.检查cuda是否安装正确
Go to run (Win + R) type cmd The following command will check for nvcc version and insure that it is set in path environment variable.

nvcc --version

You will see something like:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:04_Central_Daylight_Time_2018
Cuda compilation tools, release 10.0, V10.0.130
Now test a sample to see setup is working by running following Go to run (Win + R) type
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\extras\demo_suite\nbody.exe"

4.下载cudnn7.3.1
Goto https://developer.nvidia.com/cudnn (Membership required) After login Download the following: cuDNN v7.3.1 Library for Windows [your version] for me Windows 10 Goto downloaded folder and extract cudnn-10.0-windows10-x64-v7.3.1.20.zip Go inside extracted folder and copy all files and folder from cuda folder (eg. Bin, include, lib) and paste to “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0”.

5.安装tensorflow-gpu
先添加pip清华镜像源,然后在执行以下命令

pip install tensorflow-gpu

具体参考我写的另外一篇文章
6.测试tensorflow-gpu是否安装成功。

import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))

出现显卡信息
windows10-cuda10.0-cudn7.3.1+tensorflow-gpu1.3.1安装_第1张图片

你可能感兴趣的:(深度学习环境搭建)