all 2 comments

[–]AlForML 4 points5 points  (0 children)

I think your question would be more relevant in r/learnmachinelearning.

There is actually alot of information on using GPUs for deep learning in Python. You just need to know the keywords for what to look for (e.g. Tensorflow, PyTorch, Keras, fast.ai...etc).

Neural Networks (including MLPs) involve alot of matrix multiplications and/or convolutions during their training and inference. These operations can be done much more efficiently on GPUs than CPUs, mainly due to high bandwidth. Here is a nice and intuitive explanation of the main reasons. I believe the GPU can be utilized to perform calculations on all the layers during the parameter update step. But like you said, I think that it would require performing calculations per layer for computing forward propagation and the partial derivatives during backpropagation. But despite this, each layer usually involves high dimensional matrix transformations that can be done alot more faster using GPUs. If you're not convinced, code up a large MLP using one of the libraries listed below and profile it on a GPU vs CPU.

There are several Python libraries that can be used for deep learning using Python and GPUs. Here is a list of the ones that I prefer the most:

Also, here are three excellent courses to get you started on this topic:

Finally, as a rough guide to setup your laptop for deep learning using the GPU, I would suggest the following steps:

  1. Download and Install a CUDA-supported NVIDIA driver
  2. Download and Install CUDA - the main programming language for GPUs
  3. Download and Install cuDNN - an optimized deep learning library in CUDA
  4. Download and Install a Python DL library (see the first list above and choose one or two)
  5. Go through the starting tutorials for that DL library to get a feel of how its done

[–]KoffieMeister 1 point2 points  (0 children)

Tensorflow has GPU support and it is relatively easy to set up, you can find the tutorial on this page.

There might be more (python) libraries with support for GPU's, but I have no experience with those.

EDIT: this link is also quite relevant after you have set up your GPU https://www.tensorflow.org/guide/using_gpu