当前位置:网站首页>Tensorflow actual combat Google deep learning framework version 2 learning summary tensorflow installation
Tensorflow actual combat Google deep learning framework version 2 learning summary tensorflow installation
2022-06-10 15:23:00 【Easier said than done wangshuailpp】
The installation method is mainly divided into two versions , Namely CPU and GPU edition ,CPU The version is relatively simple , and GPU The version process is complicated . If you are just a novice tensorflow There is no need to install GPU edition , When you need to build dozens of layers of network, install GPU edition , meanwhile GPU The installation of version is different for each computer .
CPU Version main reference :
https://blog.csdn.net/colourful_sky/article/details/73823939
https://blog.csdn.net/colourful_sky/article/details/73823939
https://blog.csdn.net/zzc15806/article/details/73662491
https://blog.csdn.net/WIinter_FDd/article/details/66523468
https://blog.csdn.net/u014680339/article/details/72459392
https://blog.csdn.net/hgdwdtt/article/details/78633232
Installation environment :Ubuntu14.04/16.04LTS
1. install anaconda
1.1 Download the installation file from the official website of Tsinghua University https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/, Here I choose Anaconda3-5.1.0-Linux-x86_64.sh, Note that there Python The version is Python3.6, at present anaconda There are only two versions , Namely Python3.6 and Python2.7 edition , I suggest you to follow the tide of the times and choose a higher version Python3.6,
1.2 Run the download directly sh File can :
bash Anaconda3-5.1.0-Linux-x86_64.sh
1.3 After the installation is completed, you must verify whether the installation is successful , start-up anaconda, If it starts normally, the installation is successful , There is usually no problem with this step , If it doesn't start , Reloading won't solve the problem , It is recommended to reinstall the system
anaconda-navigator
2. install tensorflow
2.1 establish tensorflow Environmental Science
conda create -n tensorflow python=3.6
Installed here Python yes 3.6 edition ,anaconda and Python as well as tensorflow We have to match it up
2.2 Activate tensorflow Environmental Science
source activate tensorflow
After successful activation , There will be a in front of the terminal (tensorflow) identification
2.3 install tensorflow
pip install –ignore-installed –upgrade https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/tensorflow-1.4.0-cp36-cp36m-linux_x86_64.whl
What I installed here is tensorflow1.4.0 Of CPU edition , Corresponding to the edition of the book , If you want to install other versions, you can go to the website of Tsinghua University to find https://mirrors.tuna.tsinghua.edu.cn/help/tensorflow/
2.4 verification tensorflow Is the installation successful
source activate tensorflow # Activate first tensorflow Environmental Science
python # start-up python Environmental Science
import tensorflow as tf
hello = tf.constant(‘Hello, TensorFlow!’)
sess = tf.Session()
print (sess.run(hello))
Hello, TensorFlow! # Congratulations ! Installation successful !
3. stay anaconda Install the code editor on
anaconda Several code editors are required in , We choose jupyter, Interactive notebooks
3.1 First start anaconda
anaconda-navigator
start-up anaconda After that, it can be installed directly inside the software jupyter, After installation, you can directly click to open anaconda, You will see in Firefox jupyter Software
3.2 stay jupyter Use in tensorflow
First activate... In the terminal tensorflow Environmental Science
source activate tensorflow # Activate Tensorflow Environmental Science
Then open the anaconda Software
anaconda-navigator
Now open jupyter You can write code directly , If not activated tensorflow, stay jupyter Written in tensorflow The following error occurs in the code :
import tensorflow as tf # Using this code, the following error will appear
modulenotfounderror no module named tensorflow
边栏推荐
- Opentelemetry metrics release candidate
- One-way hash function
- A complete multi-user wechat public platform development source code, with free sharing of documents
- Golang []byte 转 File
- Applet network request promise
- 三子棋(c语言实现)
- How to open an account for agricultural futures? Are there any financial conditions?
- 2022第十五届南京国际数字化工业博览会
- 3、再遇HandyControl之窗体
- RSA a little bit of thought
猜你喜欢

2022第十五届南京国际工业自动化展览会

2022 Nanjing International Smart site equipment exhibition

2022 the 15th Nanjing International Digital Industry Expo

4、再遇Panuon.UI.Silver之窗体标题栏

AutoCAD - set text spacing and line spacing

如何構建以客戶為中心的產品藍圖:來自首席技術官的建議

云图说|每个成功的业务系统都离不开APIG的保驾护航

Create a space of local value together. In 2022, China successfully held the "one hundred cities tour · Ningbo Station" for commercial distribution

Explain the opencv function filter2d() in detail and remind you that the operation it does is not convolution but correlation operation

三子棋(c语言实现)
随机推荐
Odoo authority management (access authority and record rules) is applied to upgrade role management
How the autorunner automated test tool creates a project -alltesting | Zezhong cloud test
One-way hash function
Kubernetes 1.24: preventing unauthorized volume mode switching
一文带你了解J.U.C的FutureTask、Fork/Join框架和BlockingQueue
二分查找详解
opencv#4 手写体识别:自建训练集完美
企业如何提升文档管理水平
Golang []byte 转 File
2022第十五届南京国际工业自动化展览会
小程序实现全局数据共享
[reward publicity] [content co creation] issue 16 may Xu sublimation, create a good time! You can also win a gift package of up to 500 yuan if you sign a contract with Huawei cloud Xiaobian!
虚拟机ping不通的几种原因及解决办法
Explain the opencv function filter2d() in detail and remind you that the operation it does is not convolution but correlation operation
三子棋(c语言实现)
反“内卷”,消息称 360 企业安全云将上线“一键强制下班”功能,电脑自动关闭办公软件
At the early stage of product development, do you choose to develop apps or applets?
Interview question details
洞察的力量
Sanzi chess (implemented in C language)