1

I have been trying to find ways to enable parallel processing in theano while training a neural network , but I can't seem to find it. Right now when I train a network theano is only using a single core.

Also I do not have access to a GPU , so if I could make theano use all the cores on the machine, then it will hopefull speed things up.

Any tips on speeding up theano is very welcome !

nnrales
  • 1,481
  • 1
  • 17
  • 26

1 Answers1

1

This is what I have been able to figure out.

Follow the instructions on this page http://deeplearning.net/software/theano/install_ubuntu.html It seems that I did not install BLAS properly. So I reinstalled everything according to the instructions on the website.

Theano has config flags that have to be set.

And follow the discussion here Why does multiprocessing use only a single core after I import numpy?

Using all this when I run the script

THEANO_FLAGS='openmp=True' OMP_NUM_THREADS=N OPENBLAS_MAIN_FREE=1 python <script>.py 
//Where N is the number of cores 

Theano uses all the cores on my machine.

Community
  • 1
  • 1
nnrales
  • 1,481
  • 1
  • 17
  • 26