深度學習:Ubuntu16.04+雙TitanX+CUDA8.0+CUDNN5.1+Tensorflow1.0

本文基于深度學習基礎平臺環境,搭建深度學習基礎平臺請參考深度學習:Ubuntu16.04+雙TitanX+CUDA8.0+CUDNN5.1。官方提供了多種安裝方式,這里推薦使用PIP安裝方式,簡單快速,如果PIP官方源太慢,可更改為國內鏡像源,參考解決Python pip官方源安裝緩慢、出錯

要求

Requirements

The TensorFlow Python API supports Python 2.7 and Python 3.3+.
The GPU version works best with Cuda Toolkit 8.0 and cuDNN v5.1. Other versions are supported (Cuda toolkit >= 7.0 and cuDNN >= v3) only when installing from sources.

安裝

sudo apt-get install python-pip python-dev
For installing the version with GPU support, please use:
sudo pip install tensorflow-gpu

測試

$ python
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> sess.run(hello)
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> sess.run(a+b)
42
>>>

是不是很簡單,更過安裝方式請參考Tensorflow官方之南

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容