当前位置:网站首页>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 .
边栏推荐
- Implementation principle of golang synergy
- Detailed explanation of MSTP protocol for layer 3 switch configuration [Huawei ENSP experiment]
- Chapter 2-2 calculation of piecewise function [1]
- 阿里云服务器搭建和宝塔面板连接
- In addition to exporting the incremental data captured by Oracle golden gate to Oracle, where can it be exported? Can be similar
- CSV文件存储
- linux初始化mysql时报错 FATAL ERROR: Could not find my-default.cnf
- Kubernetes cluster configuration DNS Service
- There is a bug in installing CONDA environment
- How to execute the SQL assembled in ODPs SQL function and get the return value?
猜你喜欢

Introduction of functions in C language (blood Book 20000 words!!!)

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

Eight ways to solve EMC and EMI conducted interference

CSV file storage
![Train your own classification [Bao Jiaobao, the data are ready]](/img/bd/08d0fbf0d41bb5ba7c418848ea1a4c.jpg)
Train your own classification [Bao Jiaobao, the data are ready]

Warehouse of multiple backbone versions of yolov5

linux初始化mysql时报错 FATAL ERROR: Could not find my-default.cnf

Kubernetes technology and Architecture (VII)

台大林轩田《机器学习基石》习题解答和代码实现 | 【你值得拥有】

Two dimensional array and operation
随机推荐
01-TensorFlow计算模型(一)——计算图
opencv4.60版本安装和配置
象棋机器人夹伤7岁男孩手指,软件测试工程师的锅?我笑了。。。
Dry goods semantic web, Web3.0, Web3, metauniverse, these concepts are still confused? (top)
Sword finger offer
看得清比走得快更重要,因为走得对才能走得远
How to execute the SQL assembled in ODPs SQL function and get the return value?
一款入门神器TensorFlowPlayground
Review the past and know the new MySQL isolation level
Overview of head pose estimation
[cloud computing] several mistakes that enterprises need to avoid after going to the cloud
Alibaba technology has four sides + intersection +hr, and successfully got the offer. Can't double non undergraduate students enter the big factory?
网络层的IP协议
JSON file storage
App加速读取显示IPFS图片的解决方案和实现
JSON 文件存储
No one wants to tell the truth about kubernetes secret
golang 协程的实现原理
Two dimensional array and operation
从开发转测试:我从零开始,一干就是6年的自动化测试历程