TensorFlow 官方安装教程:https://www.tensorflow.org/versions/r0.10/get_started/os_setup.html
TensorFlow 官方tutorial: https://www.tensorflow.org/versions/r0.10/tutorials/mnist/beginners/index.html#the-mnist-data
TensorFlow 官方文档中文版 : http://wiki.jikexueyuan.com/project/tensorflow-zh/
安装需求:
- Python 2.7 或Python 3.3+.
- Ubuntu系统(使用Docker可以在windos下安装TensorFlow,但相对麻烦,推荐在linux环境下使用)
- 若使用GPU加速,需安装Cuda Toolkit 7.0以上版本 ->Cuda安装指南。硬件要求:Compute Capability在3.0以上的NVidia GPU Check NVIDIA Compute Capability
安装python-pip和python-dev
# Ubuntu/Linux 64-bit
$ sudo apt-get install python-pip python-dev
安装Tensorflow
选择合适的Tensorflow版本
注:“CPU only”表示只通过CPU进行计算;“GPU enabled”表示使用GPU进行加速
# Ubuntu/Linux 64-bit, CPU only, Python 2.7
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 2.7
# Requires CUDA toolkit 7.5 and CuDNN v4. For other versions, see "Install from sources" below.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp27-none-linux_x8
# Ubuntu/Linux 64-bit, CPU only, Python 3.4
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.4
# Requires CUDA toolkit 7.5 and CuDNN v4. For other versions, see "Install from sources" below.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.5
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp35-cp35m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.5
# Requires CUDA toolkit 7.5 and CuDNN v4. For other versions, see "Install from sources" below.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp35-cp35m-linux_x86_64.whl
安装Tensorflow:
# Python 2
$ sudo pip install --upgrade $TF_BINARY_URL
# Python 3
$ sudo pip3 install --upgrade $TF_BINARY_URL