Install Tensorflow GPU on Windows 10


Having the intention to share tutorials on tensorflow, I must start from the beginning. Install Tensorflow in GPU for NVIDIA cards.
I had a hell of luck trying to install tensorflow in GPU mode ... Several days wasted ... I first managed this and easily on Ubuntu which remains the environment I will advise in production ... And after having tinkered, I ended up finding a stable solution for Windows 10 on the condition of remaining in specific versions.
In this case the installation that I propose - which is largely sufficient to work professionally on Tensorflow - concerns the following versions:
  • Tensorflow 1.1
  • Cuda 8
  • and all version of CuDnn.
Then at the end of the article I propose a procedure to upgrade to version 1.4 ...

Step 1 - Install Anaconda

Install Anaconda for Python 3.x (current 3.6)

Step 2 - Install Cuda

In this case, install CUDA 8 and not version 9 (for now). For this go to the archives
and download and install version 8 here
And install CUDA 8

Step 3 - Install NVidia CuDnn

The trap is there ....
We start by installing cuDnn 6 for Cuda 8
Unzip the file in a directory for example c:\dev\nvidia cudnn
The secret is there: Download all versions of cuDnn and in the bin directory of each CuDNN version extract the DLL only and move it to the original bin nvidia cudnn
Change the path in system and users adding c:\dev\nvidia cudnn

Step 4 - Create an Anaconda environment

In Anaconda console type :
conda create -n tensorflow python=3.5 numpy scipy matplotlib spyder
Activate the environment
activate tensorflow
Install Tensorflow
pip install --ignore-installed --upgrade
Install Keras
pip install keras
Now test your Tensorflow
And execute the code
Activate tensorflow
IT DOES WORK !! Champagne

Bonus - Switch to Tensorflow version 1.4

Copy cudnn64_6 into the CUDA/bin folder
In Anaconda console type Activate tensorflow
Update Tensorflow : pip install --ignore-installed --upgrade tensorflow-gpu

Suivez moi / Follow me sur/onTwitter 


Posts les plus consultés de ce blog

Quand Google fait un KIT AI hyper débutant !!!

50 niveaux de RaspBerry Pi

Netflix AlphaGo - le documentaire à voir absolument