当前位置:网站首页>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
边栏推荐
- Kubernetes 1.24: avoid conflicts when assigning IP addresses to services
- This article introduces you to j.u.c's futuretask, fork/join framework and BlockingQueue
- Wechat applet returns to the previous page and transfers parameters
- 【云原生 | Kubernetes篇】深入RC、RS、DaemonSet、StatefulSet(七)
- Golang Beep包 播放mp3 无法获取总长度 streamer.Len()为0 其他格式却可以
- 3、再遇HandyControl之窗体
- cmake实战记录(一)
- CentOS Linux is dead! Oracle Linux may be a better alternative
- 小程序实现全局数据共享
- Explain the opencv function filter2d() in detail and remind you that the operation it does is not convolution but correlation operation
猜你喜欢

Applet network request promise

One-way hash function

如何构建以客户为中心的产品蓝图:来自首席技术官的建议

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

反“内卷”,消息称 360 企业安全云将上线“一键强制下班”功能,电脑自动关闭办公软件

Hutool使用总结(VIP典藏版)

2022 the 15th Nanjing International Digital Industry Expo

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

企业如何提升文档管理水平

AutoCAD - set text spacing and line spacing
随机推荐
Kubernetes 1.24: preventing unauthorized volume mode switching
2022 the 15th Nanjing International Digital Industry Expo
Overview of cann interface calling process
We media video Hot Ideas sharing
竟然还有人说ArrayList是2倍扩容,今天带你手撕ArrayList源码
How does CRM help enterprises and salespeople?
2022第十五届南京国际工业自动化展览会
自推荐-深入理解RUST标准库内核
Fast detection of short text repetition rate
Kubernetes 1.24: 避免为 Services 分配 IP 地址时发生冲突
How the WordPress administrator user name was leaked
One-way hash function
产品设计软件Figma用不了,国内有哪些相似功能的软件
3、再遇HandyControl之窗体
Golang []byte 转 File
CRM对企业以及销售员有哪些帮助?
Golang Beep包 播放mp3 无法获取总长度 streamer.Len()为0 其他格式却可以
Wechat applet returns to the previous page and transfers parameters
2022南京国际智慧工地装备展览会
虚拟机ping不通的几种原因及解决办法