Ubuntu Installation TensorFlow

Source: Internet
Author: User
Tags cuda toolkit

Reference website:

[1] tensorflow official website Tutorials
[2] Geek College 's translation of TensorFlow's official website tutorial

[3] How to install TensorFlow under Csdn-ubuntu

http://blog.csdn.net/zhaoyu106/article/details/52793183 [CSDN]

Https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#pip-installation

Https://www.tensorflow.org/versions/r0.11/get_started/os_setup#test_the_tensorflow_installation (official website tutorial)

http://blog.csdn.net/mydear_11000/article/details/52020835 (previous version of TensorFlow)

HTTP://WWW.JIANSHU.COM/P/636C6477250A (build TensorFlow virtual machine learning environment)

Https://github.com/CreatCodeBuild/TensorFlow-Chinese-Tutorial (Chinese video tutorial)

Ubuntu Installation TensorFlow

    1. Source installation (not successful)
    1. installation Bazel the dependency
    2. installation Bazel
      1. Pip installation

Pip Watercress Source Installation

Https://www.douban.com/note/302711300/

using the image source is simple, with - I. specify on the line:

    1. sudo easy_install-i http://pypi.douban.com/simple/ salttesting
    2. sudo pip install-i http://pypi.douban.com/simple/ salttesting

PIP installation

Note TensorFlow version and the corresponding CUDA Libraries and CuDNN version

installation TensorFlow:

0.8.0 Dependent cuda7.5 and the cudnnv4

# Ubuntu/linux 64-bit, CPU only, Python 2.7:

$ sudo pip install--upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.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.

$ sudo pip install--upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0. 8. 0-CP27-NONE-LINUX_X86_64.WHL

# Mac OS X, CPU only:

$ sudo easy_install--upgrade six

$ sudo pip install--upgrade HTTPS://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/MAC/TENSORFLOW-0.8.0-PY2-NONE-ANY.WHL

0.12.0 Dependent cuda8.0 and the cudnnv5

The GPU version works best with Cuda Toolkit 8.0 and CuDNN v5.1. Other versions is supported.

We have also uploaded the binaries to Pypi, so can simply install TensorFlow on Linux, Mac or Windows with pip install . Note you'll need PIP version 8.1 or later for the following commands to work on Linux:

$ pip Install TensorFlow

For installing the version with GPU support, please use:

$ pip Install Tensorflow-gpu

environment variable (not set)

    1. Export ld_library_path="$LD _library_path:/usr/local/cuda/lib64:/usr/local/cuda/extras/cupti/lib64"
    2. Export cuda_home=/usr/local/cuda

Test if Python is installed successfully

test with the following section of code TensorFlow whether the installation was successful:

  1. $ python
  2. ...
  3. >>> Import TensorFlow as TF
  4. >>> Hello = tf.constant (' Hello, tensorflow! ')
  5. >>> sess = tf. Session ()
  6. >>> Print (Sess.run (hello))
  7. Hello, tensorflow!.
  8. >>> a = tf.constant (10)
  9. >>> B = tf.constant (32)
  10. >>> Print (Sess.run (A + b))
  11. 42

Train the first network

    1. $ cd models/tutorials/image/mnist
    2. $ python convolutional.py

Ubuntu Installation TensorFlow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.