当前位置:网站首页>01 tensorflow calculation model (I) - calculation diagram
01 tensorflow calculation model (I) - calculation diagram
2022-07-28 09:13:00 【51CTO】
TensorFlow Calculation model —— Calculation chart
About TensorFlow
TensorFlow It's a data flow graph (data flow graphs), Open source software library for numerical calculation . node (Nodes) Show the mathematical operation in the figure , The lines in the picture (edges) It represents the multidimensional data array associated with each other among nodes , That is, tensor (tensor). Its flexible architecture allows you to perform calculations on multiple platforms , For example, one or more of the desktop computers CPU( or GPU), The server , Mobile devices, etc .TensorFlow By the first Google Brain groups ( Affiliated to the Google Machine Intelligence Research Institute ) The researchers and engineers of , For machine learning and deep neural network research , But the versatility of this system makes it widely used in other computing fields
The calculation chart is TensorFlow The most basic concept in ,TensorFlow All calculations in will be converted into nodes on the calculation graph .
The concept of computational graph
TensorFlow The information you can get from its name is , It contains two of the most important concepts ——Tensor and Flow.
- Tensor The concept of
Tensor Tensor . The concept of tensor has different interpretations in mathematics or physics , But in TensorFlow It does not emphasize its own meaning , It is simply understood as a multidimensional array .
- Flow The concept of
if TensorFlow Medium Tensor Shows its data structure , that Flow It reflects its calculation model . Chinese will Flow Translated into “ flow ”, It intuitively expresses the process of mutual transformation between tensors through calculation .
- TensorFlow Calculation diagram in
TensorFlow It is a programming system that expresses calculation in the form of calculation diagram .TensorFlow Each calculation in is a node on the calculation graph , And the edge between nodes describes the dependency between calculations .

- Use of calculation diagram
TensorFlow The general flow of the program
First of all , Define all calculations in the calculation diagram
second , Perform calculations
- Calculation definition stage
The above code produces two calculation diagrams , In each calculation diagram, a name is defined as “v” The variable of . In the calculation diagram g1 in , take v Initialize to 0; In the calculation diagram g2 in , take v Initialize to 1. It can be seen that when running different calculation diagrams , Variable v The value of is also different .TensorFlow The computational graph in can not only be used to isolate tensors and calculations , It also provides mechanisms for managing tensor and computation . The calculation diagram can be obtained by tf.Graph.device Function to specify the device that runs the calculation . This is TensorFlow Use GPU Provides a mechanism . The following program can soak the addition calculation in GPU On .
边栏推荐
- Feign调用异常[Running, pool size = 10, active threads = 10, queued tasks = 0, completed tasks = n]
- Linux initializes MySQL with fatal error: could not find my-default.cnf
- Hyperlink label
- Div tags and span Tags
- 阿里云服务器搭建和宝塔面板连接
- Oracle SQL problems
- There is a bug in installing CONDA environment
- Business digitalization is running rapidly, and management digitalization urgently needs to start
- shell 实现harbor v1/v2的备份/恢复/迁移等功能
- Solution and implementation of APP accelerating reading and displaying IPFs pictures
猜你喜欢
![[opencv] generate transparent PNG image](/img/0a/4afc9bda411634562f4b0f3915a7ba.png)
[opencv] generate transparent PNG image

Go interface Foundation

Implementation principle of golang synergy

5 运算符、表达式和语句

【592. 分数加减运算】

Data fabric, next air outlet?

No one wants to tell the truth about kubernetes secret

Go waitgroup and defer

NDK series (6): let's talk about the way and time to register JNI functions

IP protocol of network layer
随机推荐
C#简单调用FMU ,进行仿真计算
象棋机器人夹伤7岁男孩手指,软件测试工程师的锅?我笑了。。。
Realize batch data enhancement | use of keras imagedatagenerator
After summarizing more than 800 kubectl aliases, I'm no longer afraid that I can't remember commands!
Argocd Web UI loading is slow? A trick to teach you to solve
Prometheus TSDB analysis
Warehouse of multiple backbone versions of yolov5
Bluetooth technology | it is reported that apple, meta and other manufacturers will promote new wearable devices, and Bluetooth will help the development of intelligent wearable devices
DIY system home page, your personalized needs PRO system to meet!
NDK series (6): let's talk about the way and time to register JNI functions
opencv4.60版本安装和配置
侯捷STL标准库和泛型编程
TXT text file storage
从开发转测试:我从零开始,一干就是6年的自动化测试历程
View the dimensions of the list
DAPP safety summary and typical safety incident analysis
Kubernetes technology and Architecture (VII)
51单片机存储篇:EEPROM(I2C)
Detailed explanation of switch link aggregation [Huawei ENSP]
剑指offer