当前位置:网站首页>Huawei ilearning AI mathematics foundation course notes
Huawei ilearning AI mathematics foundation course notes
2022-07-29 04:57:00 【StackChan】
Huawei iLearning AI Mathematical basis Course note
Course link AI Mathematical basis
One . linear algebra
AI At the heart of , Realize the deep learning method through matrix representation , Unstructured data –> matrix (Matrix)& vector (Vector)
tensor (Tensor):TensorFlow,Pytorch An important part of the equal depth learning framework , Many operations and model optimization in deep learning are based on tensor complete

In linear classifier , Application of matrix :

Purpose : Judge whether a figure is a cat , vehicle or people ( Scores are calculated to be similar to the scores of the three objects )
technological process : Graph processing ( Expand image to column vector )–> Solve the weight matrix & Bias matrix --> Calculation y
The formula : y = w ∗ x + b ( w : power heavy Moment front x : exhibition open have to To Of That's ok o r Column towards The amount b : partial Set up Moment front y : junction fruit ) y = w*x + b (w: Weight matrices x: Expand the resulting line or Column vector b: Bias matrix y: result ) y=w∗x+b(w: power heavy Moment front x: exhibition open have to To Of That's ok or Column towards The amount b: partial Set up Moment front y: junction fruit )
A matrix in space – Corresponding –> A transformation , Such a matrix is called Transformation matrix
linear algebra = Research Spatial transformation & Vector motion Science of ,
Both of them are realized by linear transformation
The problems of design in linear algebra are all linear transformations or Linear mapping , The meet :
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-bjmqXAL6-1637857412798)( Huawei AI Training camp .assets/image-20211124175832225.png)]](/img/56/17713b907fb835ba134743bbfca35e.png)
Vector multiplication can enhance image or speech data eg. Conduct translation , rotate , The zoom
Orthogonal matrix :
A T ∗ A = A ∗ A T = I , namely A T = A − 1 A^T*A = A*A^T = I, namely A^T = A^{-1} AT∗A=A∗AT=I, namely AT=A−1The row vector and class vector of an orthogonal matrix are mutually orthogonal unit vectors
vector * Orthogonal matrix <=> Rotate the vector , without Telescopic or Spatial mapping effect
application : Orthogonal initialization ; The inverse process of orthogonal matrix –> Find matrix transposition ; Matrix decomposition
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-LzLCz8mN-1637857412802)( Huawei AI Training camp .assets/image-20211124182031622.png)]](https://img-blog.csdnimg.cn/deca0ec6679e4883bbc8e75d61a93ed1.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAU3RhY2tDaGFu,size_20,color_FFFFFF,t_70,g_se,x_1
Diagonal matrix

solve and / Bad / product / power <=> Of the main diagonal element and / Bad / product / power
Seeking inverse

application : Due to the small amount of calculation , In machine learning, some matrices are often restricted to diagonal matrices –> Reduce the cost of Computing
determinant : The square array – Mapping to –> Scalar A function of , Write it down as det(A)
determinant <=> Directed area of matrix or Volume Promotion of ,or
n In the space of Virgil , Describes the linear Centennial pairing " Volume " Impact
Value of determinant == The product of matrix eigenvalues
Absolute value of determinant => After the measurement matrix is multiplied Space expansion or Reduction multiple
Determinant plus minus => Represents the orientation of space
application : Find the eigenvalues of a matrix , Solving linear equations
The eigenvalue & Eigenvector ( Only square array ) And Matrix eigendecomposition
- Transformation matrix A–>Aa,a Only scaling transformation occurs , No rotation or Projection effect –> be-all a* Is the eigenvector , Expansion ratio ( Similarity ratio ) Eigenvalue
- features

decompose : Matrix A– decompose –> Eigenvector & The eigenvalue , It's a matrix ( Matrix ) The most common method of decomposition - From the perspective of linear space ,λ The bigger it is –> The matrix is in λ Corresponding α The greater the variance on –> The more information
- optimization In question , The larger the eigenvalue of the matrix , The greater the change of function value in the corresponding characteristic direction , In this direction , The greater the directional derivative
- application :PCA Dimension reduction / optimization / Deal with model over fitting regularization
Singular value decomposition of matrix ( It is another kind of decomposition different from feature decomposition , Non square matrices can also be decomposed )
Singular value decomposition definition :

Graphic meaning :
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-3HuXQnHU-1637857412816)( Huawei AI Training camp .assets/image-20211125220109718.png)]](/img/a5/ed8b8e85c001dfd6b3cd95b7d53e1c.png)
Rotate the matrix The zoom Projection Separated
application : Gray image compression

Two . probability theory & statistical
Study uncertainty
Poisson distribution – Poisson noise – Add Poisson noise to the image –> Image enhancement
Bayes' formula :

Bayesian algorithm
Optimization problems
Unconstrained optimization problems
- direct method ( The problem is complicated , When you can't write a specific expression , Iterative computation produces a sequence of points , Search for the best )
- Analytic method ( Indirect method , Such as : Gradient descent method , Newton method , Quasi Newton method )
Constrained optimization problem ( First, through Lagrange multiplier or KKT Conditions It turns into an unconstrained problem , Solve again )
Gradient descent method :

Gradient descent method is the method of finding the extreme value of convex function , For Nonconvex functions , At present, there is no effective method to determine its extreme value , It can only be treated as a convex function
3、 ... and . Experimental part : With video + Experimental Manual , The experimental answer
My job : Index , Know what it can achieve , What effect can be achieved .
When it is really possible to use , Can get the answer from the index in time !
- Linear algebra experiment
import numpy as np;from … import scipy as sp
be based on numpy(Python Of ) and scipy Math module
reshape( Matrix dimension transformation )
Array.T( Matrix transposition )
np.matmul(A,B) ( matrix multiplication )
np.arrage(6);reshape(3,2) // establish 3×2 matrix
print(A*B) // Matrix multiplication can also be realized
np.linalg.inv(A) // Inverse matrix
np.linalg.det(A) // Solve the value of determinant
Learned singular value decomposition for gray image compression
Solution of linear equation , Just one function (scipy.linalg.solve)
- Probability theory experiment
import numpy as np;from … import scipy as sp
be based on numpy(Python Of ) and scipy Math module
Calculating mean :np.mean(…)
np.var(b) ;np.var(A,1); # The second parameter is 1, Means to calculate variance by line
The realization effect of binomial distribution : Number of successes 、 An introduction to 、 Number of samples , And drawing
Image plus noise :
- background : Deep learning , Some new images need to be generated to train the classification model , But the new model cannot change fundamentally . such , You can add some noise
- Lena Add Gauss directly to the grayscale image or Poisson noise , The noise ratio is optional
- Optimization experiment
- Least square method Fit historical data
- Define polynomials ( That's the fitting function )
- Define the residual function
边栏推荐
- UE plays video in scene or UMG
- < El table column> place multiple pictures
- Stack and queue and priority queue (large heap and small heap) simulation implementation and explanation of imitation function
- Big silent event Google browser has no title
- 五个关联分析,领略数据分析师一大重要必会处理技能
- Introduction of JDBC preparestatement+ database connection pool
- IOS interview preparation - Online
- Flutter 手势监听和画板实现
- Implementation of flutter gesture monitoring and Sketchpad
- Traffic flow prediction pit climbing record (I): traffic flow data set, original data
猜你喜欢

电脑无法打开excel表格怎么办?excel打不开的解决方法

删除word文档中的空白页

Take you to understand JS array

WPS插入超链接无法打开,提示“无法打开指定文件”怎么办!

How to set row height and column width in excel? The method of setting row height and column width in Excel

虚拟偶像的歌声原来是这样生成的!

excel怎么设置行高和列宽?excel设置行高和列宽的方法

GCC Basics

Improve the readability of your regular expressions a hundred times

荣耀2023内推,内推码ambubk
随机推荐
力扣------对奇偶下标分别排序
Implementation of img responsive pictures (including the usage of srcset attribute and sizes attribute, and detailed explanation of device pixel ratio)
EF Core: 一对一,多对多的配置
使用近场探头和电流探头进行EMI干扰排查
leetcode 763. Partition Labels 划分字母区间(中等)
P1009 [noip1998 popularization group] sum of factorials
【无标题】
WPS如何进行快速截屏?WPS快速截屏的方法
2022杭电多校联赛第四场 题解
How to solve the problem of configuring the progress every time Office2010 is opened?
Quick start JDBC
如何让照片中的人物笑起来?HMS Core视频编辑服务一键微笑功能,让人物笑容更自然
Common current limiting methods
Download addresses of various versions of MySQL and multi version coexistence installation
iOS面试准备 - 其他篇
Various configurations when pulsar starts the client (client, producer, consumer)
The difference between the two ways of thread implementation - simple summary
Wechat picture identification
iOS面试准备 - ios篇
ios面试准备 - 网络篇