Ok, how hard should this actually be, I mean seriously?
If you are learning how to do machine learning, then you have to have TensorFlow as one of your main tools. TensorFlow comes in two main versions – the version that runs on the CPU’s in your computer, and the one that runs on GPU’s if your computer has “CUDA-enabled GPU cards”. There are multiple benefits of using GPUs over CPUs – they are more specialized at performing matrix operations and mathematical transformation, and they run much, much faster.
However, the GPU version of TensorFlow is not that easy to install, in my opinion. I was unable to get it to work at all on my laptop – a Microsoft Surface Book – which has an i7-6600U CPU and a NVIDIA GeForce GTX 965M GPU. I could never take advantage of the GPU, because I could not get all of the dependencies for TensorFlow GPU installed and working correctly, despite multiple hours/days working on this. I was stuck using the slower and less efficient CPUs whenever I used TensorFlow.
I just purchased a new desktop – an iBUYPOWER – running an i7-8700 CPU and a NVIDIA GeForce RTX 2070 GPU. Today I tried to install the GPU version of TensorFlow with no success – until I found a blog post – and I was able to install very easily and quickly following the instructions. If I were you, I would ignore the instructions posted on TensorFlow, and go immediately to the blog posting and follow those instructions.
The GPU version of TensorFlow markedly improved performance on my desktop. Using the code example in the post to train LeNet-5 on the MNIST digits data using Keras, the CPU version took 55-59 seconds to complete each individual epoch, while the GPU version took just 4 seconds to complete an epoch – a 14 fold increase in speed.
Thank you Dr. Donald Kinghorn!!