新聞中心
TensorFlow 是谷歌的第二代機(jī)器學(xué)習(xí)系統(tǒng),按照谷歌所說(shuō),在某些基準(zhǔn)測(cè)試中,TensorFlow的表現(xiàn)比第一代的DistBelief快了2倍。 TensorFlow 內(nèi)建深度學(xué)習(xí)的擴(kuò)展支持,任何能夠用計(jì)算流圖形來(lái)表達(dá)的計(jì)算,都可以使用TensorFlow,本篇文章為大家講解一下Ubuntu 18.04 下安裝 Tensorflow(CPU)具體方法。

在柳城等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場(chǎng)前瞻性、產(chǎn)品創(chuàng)新能力,以專(zhuān)注、極致的服務(wù)理念,為客戶(hù)提供成都網(wǎng)站制作、做網(wǎng)站 網(wǎng)站設(shè)計(jì)制作專(zhuān)業(yè)公司,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),高端網(wǎng)站設(shè)計(jì),成都營(yíng)銷(xiāo)網(wǎng)站建設(shè),外貿(mào)營(yíng)銷(xiāo)網(wǎng)站建設(shè),柳城網(wǎng)站建設(shè)費(fèi)用合理。
一、首先更新源為阿里云軟件源,增加下載速度
(1)備份當(dāng)前也就是默認(rèn)官方的源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
(2)刪除sources.list文件中的列表,刪除全部?jī)?nèi)容
sudo gedit /etc/apt/sources.list1
(3)替換內(nèi)容后,保存
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
(4)更新源列表
sudo apt-get update
參考:https://www.linuxidc.com/Linux/2019-04/158157.htm
二、安裝Tensorflow(Python3.6.7/CPU)
(1)安裝Python3的包管理pip
sudo apt-get install python3-pip python3-dev
教你如何在Ubuntu 18.04 下安裝 Tensorflow(CPU)教你如何在Ubuntu 18.04 下安裝 Tensorflow(CPU)
(2)安裝tensorflow
(自動(dòng)安裝相關(guān)庫(kù)numpy、tensorboard、six、protobuf、html5lib、bleach、werkzeug、markdown)
linuxidc@linuxidc:~/linuxidc.com$ sudo pip3 install tensorflow
教你如何在Ubuntu 18.04 下安裝 Tensorflow(CPU)教你如何在Ubuntu 18.04 下安裝 Tensorflow(CPU)
(3)測(cè)試tensorflow
linuxidc@linuxidc:~/linuxidc.com$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> a = tf.constant(1)
>>> b = tf.constant(2)
>>> op = a + b
>>> sess = tf.Session()
2019-06-02 06:35:29.407386: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-06-02 06:35:29.427402: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 1799995000 Hz
2019-06-02 06:35:29.427627: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x24f1710 executing computations on platform Host. Devices:
2019-06-02 06:35:29.427675: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0):
,
>>> sess.run(op) 3 >>> sess.close() >>>
教你如何在Ubuntu 18.04 下安裝 Tensorflow(CPU)教你如何在Ubuntu 18.04 下安裝 Tensorflow(CPU)
網(wǎng)頁(yè)標(biāo)題:Ubuntu18.04下安裝Tensorflow(CPU)具體方法
網(wǎng)頁(yè)地址:http://www.dlmjj.cn/article/dpeesie.html


咨詢(xún)
建站咨詢(xún)
