Python – Used by Tensorflow GPUs

Used by Tensorflow GPUs… here is a solution to the problem.

Used by Tensorflow GPUs

So I’m trying to train my first image classifier in Keras, which runs slowly with a training set of 8000 images. During training, my CPU/GPU usage was around 40%/3%, and I didn’t believe tensorflow-gpu was installed correctly at all because I didn’t see the “successfully opened CUDA library” line I should see when importing.

My question is:

  1. How long does it usually take to train something of this size on a 1080, as well

  2. Given that I’ve installed the following, what might I miss when trying to set up tensorflow-gpu?

    • Clean install of Windows 10
    • The latest 64-bit Anaconda
    • Visual Studio 2017 only checks the “Desktop development with C++” box
      When installing
    • Cuda Toolkit 9.0 with the latest patches
    • cuDNN v7.0.5 (December 5, 2017) for CUDA 9.0
    • tensorflow-GPU 1.7
    • Screenshot of environment variables

enter image description here

Solution

One way to check if your tf is using a GPU (and the best way for me) is to use nvidia-smi : Here you can see the GPU memory usage of my task (I have 1.6 million observations and 13 variables and take ~11 GB, yours should also take up a few MB or GB (don’t know how your pictures look)) so if your system won’t show that once you start running your model, this information is definitely using the CPU (GPU minutes to hours, but CPU will take longer).

nvidia-smi info

Note: My terminal doesn’t output something from tensorflow output, it looks like this in the IDE (CUDA doesn’t show up there as claimed online, cuda issues only appear in tf when it’s incompatible and can’t start the GPU):

Tensorflow uses GPU

This is the information that the test passed after the CUDNN was installed correctly:

cudnn test pass

P.S: Hope you help. Tried Tensorflow 1.7 in ubuntu yesterday and it didn’t work as expected (GPU didn’t work, so downgrade back to 1.6), so it’s recommended that you use 1.6: check the tf version

Because your settings are a bit different from the official documentation :

nvidia cuda toolkit documentation

So this is the right path :

Ensure that the following values are set:

Variable Name: CUDA_PATH 
Variable Value: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0

Related Problems and Solutions