- Published on
TensorFlow Installation
- Authors
- Name
- Martin Andrews
- @mdda123
Google just released a fantastic-looking deep learning library called TensorFlow
, complete with tutorials, and model-zoo-like examples.
Fortunately, the framework is very reminiscent of Theano
, and has a Python front-end over a computation graph construction machine in C++ / CUDA (no OpenCL as far as I can tell).
These instructions are straight off Google's Installation page, but work-for-me :
Create a VirtualEnv
virtualenv --system-site-packages ~/tensorflow
. ~/tensorflow/bin/activate
CPU Version (11Mb download)
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
GPU Version (50Mb download)
(a 1 character difference...)
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
Test it on MNIST
NB : This downloads about 13Mb of MNIST data files, if they're missing (likely on first run) :
python ~/tensorflow/lib/python2.7/site-packages/tensorflow/models/image/mnist/convolutional.py
cuDNN
v6.5 (not v7.0)
GPU Issues : TensorFlow really wants If you get something like :
...
I tensorflow/stream_executor/cuda/cuda_dnn.cc:1062] Unable to load cuDNN DSO.
...
... you haven't got cuDNN
installed like TensorFlow
expects.
- Go to the Nvidia cuDNN legacy library download site and download the v6.5 library
Uncompress and copy the cudnn
files into the toolkit directory. Assuming the toolkit is installed in /usr/local/cuda
:
tar xvzf cudnn-6.5-linux-x64-v2.tgz
sudo cp cudnn-6.5-linux-x64-v2/cudnn.h /usr/local/cuda/include
sudo cp cudnn-6.5-linux-x64-v2/libcudnn* /usr/local/cuda/lib64