当前位置:网站首页>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
边栏推荐
- 在什么场景下,我们不能使用箭头函数?
- Even some people say that ArrayList is twice as large. Today, I will take you to tear up the ArrayList source code
- 【奖励公示】【内容共创】第16期 五月絮升华,共创好时光!签约华为云小编,还可赢高达500元礼包!
- ORB_SLAM2视觉惯性紧耦合定位技术路线与代码详解1——IMU流型预积分
- AutoRunner自动化测试工具如何创建项目-Alltesting|泽众云测试
- [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!
- Ada Logics:CRI-O整体安全审计项目
- 凸函数的Hessian矩阵与高斯牛顿下降法增量矩阵半正定性的理解
- TensorFlow实战Google深度学习框架第二版学习总结-TensorFlow入门
- One-way hash function
猜你喜欢

How to build a customer-centric product blueprint: suggestions from the chief technology officer

One-way hash function

如何实现erp外网连接?

RSA a little bit of thought

二分查找详解

2022 the 15th Nanjing International Industrial Automation Exhibition

共创地市价值空间,2022年华为商业分销地市百城行·宁波站成功举办

100003字,带你解密 双11、618电商大促场景下的系统架构体系

Remote monitoring and data acquisition solution

2022 Nanjing International Smart site equipment exhibition
随机推荐
如何构建以客户为中心的产品蓝图:来自首席技术官的建议
How to build a customer-centric product blueprint: suggestions from the chief technology officer
Golang []byte 转 File
After class assignment for module 8 of phase 6 of the construction practice camp
Self recommendation - in depth understanding of the rust Standard Library Kernel
佳博GP2120TU标签打印机 安装和使用教程(PC)
远程监控及数据采集解决方案
一文带你了解J.U.C的FutureTask、Fork/Join框架和BlockingQueue
Applet warning: now you can provide attr `wx:key` for a `wx:for` to improve performance
JS get the maximum value in the array
Using GDB to quickly read the kernel code of PostgreSQL
Jaeger introduces native support for opentelemetry
Kubernetes 1.24: avoid conflicts when assigning IP addresses to services
We media video Hot Ideas sharing
In what scenario can we not use the arrow function?
As a programmer, is it really that important for the underlying principles?
[cloud native | kubernetes] in depth RC, RS, daemonset, statefulset (VII)
Explain the opencv function filter2d() in detail and remind you that the operation it does is not convolution but correlation operation
cmake实战记录(一)
Comment construire un plan de produit axé sur le client: conseils du CTO