How to install TensorFlow GPU on Windows 10 (2017)

Prerequisites:

  • Windows 10
  • Python 3.5
  • GPU that supports CUDA 3.0 or higher. (See: Cuda-GPUs)

Step 1: Install Visual Studio Community 2015

  1. Join the Microsoft Dev Essentials program. (Don’t worry, it’s free)
  2. Download and Install Visual Studio Community 2015 with Update 3. It might take awhile.

Step 2: Install CUDA 8.0

  1. Download and Install CUDA Toolkit 8.0.

Step 3: Install cuDNN v6.0 for CUDA 6.0

  1. Join the NVIDIA Developer Program.
  2. Download cuDNN v6.0 for CUDA 8.0 for Windows 10.
  3. Unzip the contents of cuDNN into the CUDA installation directory. (Default: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0)

Step 4: Install Tensorflow-GPU

Install Tensorflow GPU via pip using:

pip install --upgrade tensorflow-gpu

Step 5: Check installation

>>> import tensorflow as tf
>>>
>>> hello = tf.constant('Hello, Aaron!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
b'Hello, Aaron!'

Step 6: Rethink your choice of breakfast.