Skip to content Skip to sidebar Skip to footer

Why Tensorflow-gpu Is Still Using Cpu

I am using Keras with tensorflow-gpu in backend, I don't have tensorflow (CPU - version) installed, all the outputs show GPU selected but tf is using CPU and system memory when i r

Solution 1:

It is using the GPU, as you can see in logs. The problem is, that a lot of things can not be done on the GPU and as long your data is small and your complexity is low, you will end up with low GPU usage.

  • Maybe the batch_size is to low -> Increase until you run into OOM Errors
  • Your data loading is consuming a lot of time and your gpu has to wait (IO Reads)
  • Your RAM is to low and the application uses Disk as a fallback
  • Preprocsssing is to slow. If you are dealing with image try to compute everything as a generator or on the gpu if possible
  • You are using some operations, which are not GPU accelerated

Here is some more detailed explanation.


Post a Comment for "Why Tensorflow-gpu Is Still Using Cpu"