TensorFlow簡單介紹和在centos上的安裝

來源:互聯網
上載者:User

標籤:env   open   pac   download   http   維數   來源   F12   binary   

 
##tensorflow簡單介紹:

TensorFlow? is an open source software library for numerical computation using data flow graphs.https://www.tensorflow.org/
TensorFlow是Google基於DistBelief進行研發的第二代人工智慧學習系統,其命名來源於本身的運行原理。Tensor(張量)意味著N維數組,Flow(流)意味著基於資料流圖的計算,TensorFlow為張量從圖象的一端流動到另一端計算過程。
選擇virtualenv install的方法;TensorFlow支援CNN、RNN和LSTM演算法,這都是目前在Image,Speech和NLP最流行的深度神經網路模型。


##tensorflow安裝步驟:
 [[email protected] ylHe_test]$ virtualenv --system-site-packages ~/tensorflow
New python executable in /home/biostack/tensorflow/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.

[[email protected] ylHe_test]$ source ~/tensorflow/bin/activate

(tensorflow)[[email protected] ylHe_test]$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp27-none-linux_x86_64.whl

(tensorflow)[[email protected] ylHe_test]$ sudo pip install --upgrade $TF_BINARY_URL --trusted-host pypi.douban.com
Collecting tensorflow==0.11.0rc1 from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp27-none-linux_x86_64.whl
  Using cached https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp27-none-linux_x86_64.whl
Requirement already up-to-date: six>=1.10.0 in /usr/lib/python2.7/site-packages (from tensorflow==0.11.0rc1)
Collecting wheel (from tensorflow==0.11.0rc1)
  Downloading http://pypi.doubanio.com/packages/8a/e9/8468cd68b582b06ef554be0b96b59f59779627131aad48f8a5bce4b13450/wheel-0.29.0-py2.py3-none-any.whl (66kB)
    100% |████████████████████████████████| 71kB 3.4MB/s
Collecting mock>=2.0.0 (from tensorflow==0.11.0rc1)
  Downloading http://pypi.doubanio.com/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 2.7MB/s
Collecting numpy>=1.11.0 (from tensorflow==0.11.0rc1)
  Downloading http://pypi.doubanio.com/packages/5e/d5/3433e015f3e4a1f309dbb110e8557947f68887fe9b8438d50a4b7790a954/numpy-1.11.2-cp27-cp27mu-manylinux1_x86_64.whl (15.3MB)
    100% |████████████████████████████████| 15.3MB 4.3MB/s
Collecting protobuf==3.0.0 (from tensorflow==0.11.0rc1)
  Downloading http://pypi.doubanio.com/packages/97/e4/b2e4c62394cf1bf69b6b1261a0e8d864672a8b9c975a1bc2803fda2c35b7/protobuf-3.0.0-py2.py3-none-any.whl (342kB)
    100% |████████████████████████████████| 348kB 4.1MB/s
Collecting funcsigs>=1; python_version < "3.3" (from mock>=2.0.0->tensorflow==0.11.0rc1)
  Downloading http://pypi.doubanio.com/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock>=2.0.0->tensorflow==0.11.0rc1)
  Downloading http://pypi.doubanio.com/packages/b8/a1/7abb01fd93d66fc71e24e5df9ca6d7d9acfb4b715937d2a38fd739f266e6/pbr-1.10.0-py2.py3-none-any.whl (96kB)
    100% |████████████████████████████████| 102kB 2.9MB/s
Collecting setuptools (from protobuf==3.0.0->tensorflow==0.11.0rc1)
  Downloading http://pypi.doubanio.com/packages/74/c5/c78a788e65f9eb241c531839e909df1226534ea2d09d300231766b82b79a/setuptools-28.7.1-py2.py3-none-any.whl (472kB)
    100% |████████████████████████████████| 481kB 4.7MB/s
Installing collected packages: wheel, funcsigs, pbr, mock, numpy, setuptools, protobuf, tensorflow
  Found existing installation: mock 1.0.1
    Uninstalling mock-1.0.1:
      Successfully uninstalled mock-1.0.1
  Found existing installation: numpy 1.11.1
    Uninstalling numpy-1.11.1:
      Successfully uninstalled numpy-1.11.1
  Found existing installation: setuptools 24.0.3
    Uninstalling setuptools-24.0.3:
      Successfully uninstalled setuptools-24.0.3
Successfully installed funcsigs-1.0.2 mock-2.0.0 numpy-1.11.2 pbr-1.10.0 protobuf-3.0.0 setuptools-28.7.1 tensorflow-0.11.0rc1 wheel-0.29.0

##簡單的測試
(tensorflow)[[email protected] ylHe_test]$ python
Python 2.7.5 (default, Sep 15 2016, 22:37:39)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant("hello,tensorflow")
>>> sess = tf.Session()
>>> print(sess.run(hello))
hello,tensorflow
>>> exit()




學習串連:http://blog.csdn.net/lynnandwei/article/details/51722119

TensorFlow簡單介紹和在centos上的安裝

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.