Make sure pip
is using the right version of python
(in this case I'm using homebrew):
$ echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
$ echo export PATH='/usr/local/sbin:$PATH' >> ~/.bash_profile
$ python --version
Python 2.7.6
$ pip --version
pip 1.5.4 from /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg (python 2.7)
Install nose:
$ sudo pip install nose
Install the latest version of Theano:
$ pip install Theano --upgrade --no-deps git+git://github.com/Theano/Theano.git
Install CUDA.
Add flags for Theano (to use CUDA, or Accelerate when needed):
$ echo export CUDA_ROOT=/Developer/NVIDIA/CUDA-6.5 >> ~/.bash_profile
$ echo export THEANO_FLAGS=blas.ldflags=-lblas,device=gpu,floatX=float32 >> ~/.bash_profile
Test Theano:
$ python -c "import theano; theano.test(verbose=3)"
You should see "Using gpu device" as the beginning of the first line.
Go to energy settings and turn off automatic graphics card switching to turn your NVIDIA card on.
Grab a copy of the Deep Learning Tutorials GitHub repository:
$ git clone https://github.com/lisa-lab/DeepLearningTutorials.git
Make sure to get Pillow to replace PIL:
$ pip install Pillow
Run some code:
$ python code/logistic_sgd.py