Guide
version
- ubuntu 16.04 64 bit
- cuda driver 384.130
- tensorflow-gpu 1.4.0 (CUDA 8.0 + cudnn 6.0)
- tensorflow-gpu 1.5.0+ (CUDA 9.0 + cudnn )
- python 3.5
install
version:
- cpu: tensorflow
- gpu: tensorflow-gpu
commands
1 | workon py3 |
tips, for virtualenv workon see python virtualenv tutorial
test
1 | import tensorflow as tf |
output
Tensor("Const:0", shape=(), dtype=string)
Hello, TensorFlow!
fix errors
error
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory
tensorflow-gpu 1.5
use cuda 9.0
, so we install tensorflow-gpu 1.4
to use cuda 8.0
1 | pip uninstall tensorflow-gpu |
Jupyter notebook with tensorflow
install tensorflow kernel
1 | workon py3 |
use tensorflow kernel
1 | cd workspace/anjian |
create a notebook with tensorflow
kernel
Demo
disable info
1 | import os |
Reference
History
- 20180821: created.