Pycuda vs theano vs pylearn2

I am currently studying GPU programming to improve the performance of machine learning algorithms. I initially try to learn cuda programming with pure c, then I found pycuda, which for me was a wrapper for the cuda library, and then I found theano and pylearn2 and got a little confused:

I understand them as follows:

  • pycuda: python shell for cuda library. A.
  • theano: similar to numpy but transparent to the GPU and CPU.
  • pylearn2: A deep learning package that is built on theano and has implemented several machine learning / deep learning models.

Since I'm new to GPU programming, do I have to start learning with a C / C ++ implementation, or starting with pycuda enough, even starting with theano? For example. I would like to implement the randomForest model after learning GPU programming. Thanks.

+8
theano deep-learning pycuda
source share
1 answer

Your understanding is almost correct. I will just add some comments about Teano. This is much more than Numpy, which can run on a GPU. Theano really is a math expression compiler that translates symbolic math expressions into highly optimized C / CUDA code designed for both CPU and GPU. The code that it generates is often much more efficient than the code that most programmers will write. Theano can also make symbolic differentiation (very useful for gradient-based optimization), and also has a function to achieve better numerical stability (which is probably something useful, although I don't really know to what extent). Most likely, Teano will be enough to realize what you need. If you still decide to learn CUDA or PyCUDA, choose one that does not have the language you will use, C ++ or Python.

+8
source share

All Articles