$ pip install –upgrade keras –user
Collecting keras Downloading Keras-2.0.1.tar.gz (192kB) 100% |████████████████████████████████| 194kB 2.9MB/s Requirement already up-to-date: theano in ./.local/lib/python2.7/site-packages (from keras) Requirement already up-to-date: pyyaml in ./.local/lib/python2.7/site-packages (from keras) Requirement already up-to-date: six in ./.local/lib/python2.7/site-packages (from keras) Requirement already up-to-date: numpy>=1.7.1 in /usr/local/lib/python2.7/dist-packages (from theano->keras) Collecting scipy>=0.11 (from theano->keras) Downloading scipy-0.19.0-cp27-cp27mu-manylinux1_x86_64.whl (45.0MB) 100% |████████████████████████████████| 45.0MB 34kB/s Building wheels for collected packages: keras Running setup.py bdist_wheel for keras ... done Stored in directory: /home/avkash/.cache/pip/wheels/fa/15/f9/57473734e407749529bf55e6b5038640dc7279d5718b2c368a Successfully built keras Installing collected packages: keras, scipy Found existing installation: Keras 1.2.2 Uninstalling Keras-1.2.2: Successfully uninstalled Keras-1.2.2 Successfully installed keras-2.0.1 scipy-0.19.0
$ pip install –upgrade tensorflow-gpu –user
Collecting tensorflow-gpu Downloading tensorflow_gpu-1.0.1-cp27-cp27mu-manylinux1_x86_64.whl (94.8MB) 100% |████████████████████████████████| 94.8MB 16kB/s Requirement already up-to-date: mock>=2.0.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu) Requirement already up-to-date: numpy>=1.11.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu) Requirement already up-to-date: protobuf>=3.1.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu) Requirement already up-to-date: wheel in /usr/lib/python2.7/dist-packages (from tensorflow-gpu) Requirement already up-to-date: six>=1.10.0 in ./.local/lib/python2.7/site-packages (from tensorflow-gpu) Requirement already up-to-date: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from mock>=2.0.0->tensorflow-gpu) Requirement already up-to-date: pbr>=0.11 in ./.local/lib/python2.7/site-packages (from mock>=2.0.0->tensorflow-gpu) Requirement already up-to-date: setuptools in ./.local/lib/python2.7/site-packages (from protobuf>=3.1.0->tensorflow-gpu) Requirement already up-to-date: appdirs>=1.4.0 in ./.local/lib/python2.7/site-packages (from setuptools->protobuf>=3.1.0->tensorflow-gpu) Requirement already up-to-date: packaging>=16.8 in ./.local/lib/python2.7/site-packages (from setuptools->protobuf>=3.1.0->tensorflow-gpu) Requirement already up-to-date: pyparsing in ./.local/lib/python2.7/site-packages (from packaging>=16.8->setuptools->protobuf>=3.1.0->tensorflow-gpu) Installing collected packages: tensorflow-gpu Successfully installed tensorflow-gpu-1.0.1
$ python -c ‘import keras as tf;print tf.version‘
Using TensorFlow backend. I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally 2.0.1
$ python -c ‘import tensorflow as tf;print tf.version‘
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally 1.0.1