- install CUDA download cuda-repo-ubuntu1604_8.0.44-1_amd64.deb from here
- update path settings
add the following lines at the end of ~/.bashrc and type "source ~/.bashrc" on terminal.
- # for CUDA and cuDNN
- export PATH=/usr/local/cuda-8.0/bin:$PATH
- export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
- install cuDNN
download cuDNN package from here
- tar xzvf cudnn-8.0-linux-x64-v5.1.tgz
- sudo cp -a cuda/lib64/* /usr/local/cuda-8.0/lib64/
- sudo cp -a cuda/include/* /usr/local/cuda-8.0/include/
- sudo ldconfig
- install theano
pip install --upgrade --no-deps git+https://github.com/Theano/Theano.git
- create ~/.theanorc and write down the following lines [global]device = gpu floatX = float32 [nvcc] flags=-D_FORCE_INLINES [cuda] root = /usr/local/cuda-8.0
- install keras pip install --upgrade --no-deps git+https://github.com/fchollet/keras.git
If python outputs any tensorflow-related warning, edit backend information in ~/.keras/keras.json from tensorflow to theano.