To use tensorflow library on GPU, NVIDIA CUDA Toolkit and cuDNN libraries need to be first installed. Installing tensorflow-gpu is straight forward. Installing the NVIDIA CUDA Toolkit and cuDNN is slightly tricky, we need to ensure a couple of things so that CUDA toolkit works that tensorflow-gpu uses under the hood.
Let’s begin…
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0 or wherever the CUDA toolkit is installed. Create the missing variables.
CUDA_HOME - this needs to be added manuallyCUDA_PATH - this is usually created after installing CUDA Toolkit 8.0CUDA_PATH_V8_0 - this is usually created after installing CUDA Toolkit 8.0tensorflow-gpu
pip install tensorflow-gpu OR conda install tensorflow-gpu (if using anaconda). If already installed, uninstall it and then reinstall. It didn’t work for me until I reinstalled.tflearn is required, install it with one of the below commands
pip install tflearnconda install -c derickl tflearnYou can find the official tensorflow documentation guide for tensorflow-gpu setup here.