Install Gpu Version of Tensorflow under Windows System

Install Gpu Version of Tensorflow under Windows System

  • Created on Thur. Jul 11 10:20:30 2018
  • author: Jian Cao
  • email:1010051891@qq.com

Step 1. Create a runtime environment for python 3.5
 Press Win + R
 Type ‘cmd’
 Type ‘conda create -n tensorflow python=3.5’

Note: You need to install anaconda first (version: anaconda 4.1.0; python 3.5.1).
The installation address is :
https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-4.1.0-Windows-x86_64.exe

Step 2. Install TensorFlow
 Type ‘activate tensorflow’
 Type ‘pip install tensorflow-gpu==1.0.1’

Note: If you fail to install tensorflow-gpu in the previous step, you can download the installation package.
The installation address is :
https://mirrors.tuna.tsinghua.edu.cn/tensorflow/windows/gpu/tensorflow_gpu-1.0.1-cp35-cp35m-win_amd64.whl

Then go to the path of the package:
Type ‘cd \Users\XXX\Downloads’

Then install tensorflow:
Type ‘pip install tensorflow_gpu-1.0.1-cp35-cp35m-win_amd64.whl’

Step 3. Install CUDA (Version: 8.0)
 The installation address is:
https://developer.nvidia.com/CUDA-80-download-archive
 Choose ‘Windows’, ‘x86_64’, ‘10’, ‘exe(local)’, then download the installation package.

Step 4. Install CUDNN
 The installation address is :
https://developer.nvidia.com/rdp/CUDNN-archive
 Choose ‘Download CUDNN v5.1 (Jan 20, 2017), for CUDA 8.0’, ‘CUDNN v5.1 Library for Windows 10’.
 Decompress it and copy three subfolders named ‘bin’, ‘include’ and ‘lib’.
 Paste those three subfolders in the installation directory of CUDA.
(.\ NVIDIA GPU Computing Toolkit\CUDA\v8.0)

Step 5. Test whether tensorflow-gpu is installed successfully
 Press Win + R
 Type ‘cmd’
 Type ‘python’
 Type

import tensorflow as tf
matrix1 = tf.constant([[3., 3.]])     
matrix2 = tf.constant([[2.],[2.]])    
product = tf.matmul(matrix1, matrix2) 
sess = tf.Session() 

 Note: Tensorflow-gpu is installed successfully if the output contains your graphics card information.

 Reference : https://blog.csdn.net/hdd0411/article/details/71305931

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值